<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Querydef using IN operator in Where clause in Adobe Campaign Classic Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462120#M15758</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;LI-USER uid="17418247"&gt;&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your condition should be something like :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;condition expr={"@RecipientId in ("+primarykeys+")"}/&amp;gt;&lt;/PRE&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amine&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2022 13:37:08 GMT</pubDate>
    <dc:creator>Amine_Abedour</dc:creator>
    <dc:date>2022-07-21T13:37:08Z</dc:date>
    <item>
      <title>Querydef using IN operator in Where clause</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462094#M15751</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get data from a schema using the following query but it doesn't work. Because it doesn't recognize the IN operator. Is there another way to do this?&amp;nbsp; My goal is to calculate the maximum sales from each product. So after this i want to do a calculation but first i need the data...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var query = xtk.queryDef.create(
  &amp;lt;queryDef schema={vars.targetSchema} operation="select" distinct="true"&amp;gt;
    &amp;lt;select&amp;gt;
      &amp;lt;node expr="@id"/&amp;gt;  
    &amp;lt;/select&amp;gt;
  &amp;lt;/queryDef&amp;gt;);

var results = query.ExecuteQuery();

var primarykeys = []

for each (var row in results){
primarykeys.push(row.@id)
}
logInfo(vars.primarykeys)
	
	var querys = xtk.queryDef.create(
    &amp;lt;queryDef schema="cus:products" operation="select"&amp;gt;
        &amp;lt;select&amp;gt;
            &amp;lt;node expr="@sales"/&amp;gt;
            &amp;lt;node expr="@productID"/&amp;gt;
        &amp;lt;/select&amp;gt;
        &amp;lt;where&amp;gt;
            &amp;lt;condition expr={"@RecipientId " in "'"+primarykeys+"'"}/&amp;gt;
        &amp;lt;/where&amp;gt;
    &amp;lt;/queryDef&amp;gt;
    )

var result = querys.ExecuteQuery()&lt;/LI-CODE&gt;&lt;P&gt;Thank you in advance&lt;SPAN&gt;&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://experienceleaguecommunities.adobe.com/html/@31B4D6D7B3510763F3CBB2AAB7997408/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 10:58:49 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462094#M15751</guid>
      <dc:creator>J2021</dc:creator>
      <dc:date>2022-07-21T10:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Querydef using IN operator in Where clause</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462120#M15758</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;LI-USER uid="17418247"&gt;&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your condition should be something like :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;condition expr={"@RecipientId in ("+primarykeys+")"}/&amp;gt;&lt;/PRE&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amine&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 13:37:08 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462120#M15758</guid>
      <dc:creator>Amine_Abedour</dc:creator>
      <dc:date>2022-07-21T13:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Querydef using IN operator in Where clause</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462133#M15760</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="11369192"&gt;&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried and i'm getting this error back:&amp;nbsp;&lt;/P&gt;&lt;P&gt;21/07/2022 17:01:51 js23 JST-310000 Error while compiling script 'WKF26806/js23' line 39: invalid 'in' operand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 15:04:47 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462133#M15760</guid>
      <dc:creator>J2021</dc:creator>
      <dc:date>2022-07-21T15:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Querydef using IN operator in Where clause</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462175#M15761</link>
      <description>&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Try as below, this should work&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;condition expr={"@RecipientId IN ('"+primarykeys+"')"}/&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Thanks,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;SSB&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 18:13:15 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462175#M15761</guid>
      <dc:creator>Ssb_94</dc:creator>
      <dc:date>2022-07-21T18:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Querydef using IN operator in Where clause</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462808#M15773</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;If primarykeys is an Array, I suggest this :&lt;/P&gt;
&lt;PRE&gt;&amp;lt;condition expr={"@RecipientId IN ('" + primarykeys.join("','") + "')"}/&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cedric &lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 22:33:37 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/462808#M15773</guid>
      <dc:creator>CedricRey</dc:creator>
      <dc:date>2022-07-26T22:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Querydef using IN operator in Where clause</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/540256#M15880</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="17418247"&gt;&lt;/LI-USER&gt;,&lt;/P&gt;
&lt;P&gt;Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 08:45:51 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/querydef-using-in-operator-in-where-clause/m-p/540256#M15880</guid>
      <dc:creator>Sukrity_Wadhwa</dc:creator>
      <dc:date>2022-08-10T08:45:51Z</dc:date>
    </item>
  </channel>
</rss>

