<?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>Dear all,  I am trying to update some columns in a DB using a Query Da</title><link>https://community.appian.com/discussions/f/process/6468/dear-all-i-am-trying-to-update-some-columns-in-a-db-using-a-query-da</link><description>Dear all, I am trying to update some columns in a DB using a Query Database Smart Service Task and I need to use the IN wildcard for the WHERE clause. Typically in my mind it should look like this UPDATE mytable SET row = 0 WHERE id IN (ac!oneVariable</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Dear all,  I am trying to update some columns in a DB using a Query Da</title><link>https://community.appian.com/thread/42686?ContentTypeID=1</link><pubDate>Tue, 31 Jan 2017 14:55:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ba13bf92-7f76-4f2f-9cdd-24fd0258a4f3</guid><dc:creator>Venu</dc:creator><description>@ricky, Refert this news post, it may help you.&lt;br /&gt;&lt;a href="/search?q=OriginalPostID-255471"&gt;forum.appian.com/.../e-255471&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dear all,  I am trying to update some columns in a DB using a Query Da</title><link>https://community.appian.com/thread/42627?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 19:30:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:308a141e-7a7a-4eca-8ca5-39fce7eadd78</guid><dc:creator>rickyc472</dc:creator><description>@venusaikumarc, I am facing same issue. Could you please tell me how did you solve issue?&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dear all,&lt;br /&gt;&lt;br /&gt;I am trying to update some columns in a DB using a Query Da</title><link>https://community.appian.com/thread/25634?ContentTypeID=1</link><pubDate>Thu, 17 Dec 2015 11:46:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:69aaeab7-e59e-47cc-82fc-0a6e4003206c</guid><dc:creator>Venu</dc:creator><description>my issue resolved...!&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dear all,&lt;br /&gt;&lt;br /&gt;I am trying to update some columns in a DB using a Query Da</title><link>https://community.appian.com/thread/25612?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 20:21:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:71ddd1ec-337a-47a6-993a-139ca8a471c3</guid><dc:creator>Venu</dc:creator><description>HI Octav,&lt;br /&gt;&lt;br /&gt;i am facing the similar issue,&lt;br /&gt;i need to select two columns from View and used where clause, in operator,&lt;br /&gt;here the values for In operator comes from acp.&lt;br /&gt;&lt;br /&gt;SELECT DISTINCT&lt;br /&gt;status,ftn_Id&lt;br /&gt;FROM&lt;br /&gt;schema.my_view&lt;br /&gt;WHERE service IN (&amp;#39;service1&amp;#39;,&amp;#39;service2&amp;#39;)&lt;br /&gt;AND INSTR(ac!ftn_Id, CONCAT(&amp;#39;,&amp;#39;, ftn_Id, &amp;#39;,&amp;#39;)) &amp;gt; 0&lt;br /&gt;AND ROWNUM =1&lt;br /&gt;&lt;br /&gt;i am using Oracle.&lt;br /&gt;&lt;br /&gt;Any suggestions.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dear all,&lt;br /&gt;&lt;br /&gt;I am trying to update some columns in a DB using a Query Da</title><link>https://community.appian.com/thread/25356?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2015 12:39:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dd41fe0a-d67c-4fc3-a772-ed92d09b9793</guid><dc:creator>octavianp</dc:creator><description>Dear all, &lt;br /&gt;&lt;br /&gt;First of all thank you very much for the advice it was indeed helpful. I used sureshrk advice with some modifications: for MsSQL the function is CHARINDEX and I used it like CHARINDEX(CONCAT(&amp;#39;,&amp;#39;, cast(idColumn as varchar(100)), &amp;#39;,&amp;#39;, ac!ids)&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Octav&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dear all,&lt;br /&gt;&lt;br /&gt;I am trying to update some columns in a DB using a Query Da</title><link>https://community.appian.com/thread/25327?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 22:44:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5e07d7e9-08b2-4373-b7d4-141a3ed508b3</guid><dc:creator>sureshrk</dc:creator><description>INSTR is MySQL function and you need to find the similar function for Oracle and MsSql&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dear all,&lt;br /&gt;&lt;br /&gt;I am trying to update some columns in a DB using a Query Da</title><link>https://community.appian.com/thread/25326?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 22:38:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d67a8e1a-5b7a-42dc-a7f2-036c55837c0c</guid><dc:creator>sureshrk</dc:creator><description>1. Create Process Variable&lt;br /&gt;idList(Text, Multiple)&lt;br /&gt;&lt;br /&gt;2. Create Activity Variable&lt;br /&gt;ac!ids(Text)&lt;br /&gt;&lt;br /&gt;3. Set activity Variable(ac!ids) to below definition&lt;br /&gt;= &amp;quot;,&amp;quot; &amp;amp; joinarray (pv!idList, &amp;quot;,&amp;quot;) &amp;amp; &amp;quot;,&amp;quot;&lt;br /&gt;&lt;br /&gt;4. Add Query like one below&lt;br /&gt;SELECT idColumn, nameColumn, descColumn FROM table1 WHERE INSTR(ac!ids, CONCAT(&amp;#39;,&amp;#39;, idColumn, &amp;#39;,&amp;#39;)) &amp;gt; 0&lt;br /&gt;&lt;br /&gt;5. Use the same logic (where clause) for update.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dear all,&lt;br /&gt;&lt;br /&gt;I am trying to update some columns in a DB using a Query Da</title><link>https://community.appian.com/thread/25325?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 22:35:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d3fd3c18-c34e-4f40-9145-438ea27435ce</guid><dc:creator>sikhivahans</dc:creator><description>@octavianp Just in case, if you haven't made a search already in the forum, the post at https://forum.appian.com/suite/tempo/entry/e-180895 looks similar to what you are looking for.&lt;br /&gt;&lt;br /&gt;Re best practices, if you are asking with respect to the implementation of the native sql query, I am not much aware of it. If you are asking with respect to implementation of the smart services (query db or write to data store), then as said by other user, choosing Write to Data Store Entity would be good. But at the same time, as per my knowledge, there isn't any wrong in choosing 'Query DB' if the database vendor is not going to change frequently and the native SQL queries are straight and simple.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dear all,&lt;br /&gt;&lt;br /&gt;I am trying to update some columns in a DB using a Query Da</title><link>https://community.appian.com/thread/25324?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 22:25:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2b3d89ed-a8e2-4d2f-81eb-030c321dcaaa</guid><dc:creator>Vinod Bongoni</dc:creator><description>It will be good to use &amp;quot;Write to Data Store Entity&amp;quot; smart service, instead Query Database smart service. &lt;a href="https://forum.appian.com/suite/help/7.11/Write_to_Data_Store_Entity_Smart_Service.html"&gt;forum.appian.com/.../Write_to_Data_Store_Entity_Smart_Service.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>