<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>I want to execute a query using the query database smart service, which looks li</title><link>https://community.appian.com/discussions/f/integrations/281/i-want-to-execute-a-query-using-the-query-database-smart-service-which-looks-li</link><description>I want to execute a query using the query database smart service, which looks like this: delete from table_name where id in (123,345,etc.). The Id is of type integer. If I try to use an array variable it throws an error. Any ideas on how I could achieve</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: I want to execute a query using the query database smart service, which looks li</title><link>https://community.appian.com/thread/965?ContentTypeID=1</link><pubDate>Fri, 09 Nov 2012 14:29:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:68cab331-526d-41b7-b336-34e43ab3960a</guid><dc:creator>livior</dc:creator><description>I used a different query for this:&lt;br /&gt;&lt;br /&gt;SELECT `id`, `field` FROM `table`&lt;br /&gt;WHERE INSTR(ac!idList_txt, concat(&amp;#39;|&amp;#39;, CAST(id AS CHAR), &amp;#39;|&amp;#39;)) &amp;gt; 0&lt;br /&gt;&lt;br /&gt;with idList_txt set to &amp;quot;|&amp;quot;&amp;amp;joinarray(idList_int, &amp;quot;|&amp;quot;)&amp;amp;&amp;quot;|&amp;quot;&lt;br /&gt;&lt;br /&gt;as it misbehaved using the suggested query, especially for a single ID in the list idList_int.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to execute a query using the query database smart service, which looks li</title><link>https://community.appian.com/thread/719?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2012 16:19:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6eabb97c-ff47-48d8-8be8-f099b4ef6f45</guid><dc:creator>moritzw</dc:creator><description>Got it working. Thanks!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to execute a query using the query database smart service, which looks li</title><link>https://community.appian.com/thread/718?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2012 15:44:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:787401cb-09b2-4349-847a-c9d0c23164c0</guid><dc:creator>Sanjay</dc:creator><description>The way we&amp;#39;ve handled SQL WHERE IN clause is by using sub-string matching. Following two discussions provide insight to this approach:&lt;br /&gt;&lt;a href="https://forum.appian.com/suite/apps/resources/discussions/thread/528"&gt;forum.appian.com/.../528&lt;/a&gt;&lt;br /&gt;&lt;a href="https://forum.appian.com/suite/apps/resources/discussions/thread/6124"&gt;forum.appian.com/.../6124&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The substring function to be used differs according to RDBMS. In case of MySQL, it would be something like;&lt;br /&gt;delete from table WHERE INSTR(ac!idList, concat(&amp;#39;,&amp;#39;, CAST(id AS CHAR), &amp;#39;,&amp;#39;)) &amp;gt; 0&lt;br /&gt;&lt;br /&gt;If &amp;#39;id&amp;#39; field is char/varchar, no need to do CAST().&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>