<?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>&amp;quot;You should enter only a single query in a row.&amp;quot; ???</title><link>https://community.appian.com/discussions/f/general/28384/you-should-enter-only-a-single-query-in-a-row</link><description>I have this query delete from PLSM_note where noteId in (fn!substitute(fn!joinarray(ac!selectedRecordIds, &amp;quot;;&amp;quot;),&amp;quot;;&amp;quot;,&amp;quot;,&amp;quot;)) as shown in the below image. 
 This query should translate to: 
 delete from PLSM_note where noteId in (1,2,4,50) However, I&amp;#39;m getting</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: "You should enter only a single query in a row." ???</title><link>https://community.appian.com/thread/111074?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2023 17:46:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ad15c154-750f-4738-a7ad-58ae6e87d597</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;And if you&amp;#39;re going with the approach of updating the &amp;quot;is active&amp;quot; flag (etc) on a row, and deactivating them rather than deleting them - then yes, the lazy / most common approach would see the entire rows queried, modified, and written back - and really this would never be an issue unless the load of such transactions is expected to be heavy consistently.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If so, then it&amp;#39;s fairly easy to create an alternative CDT and accompanying DSE that contains JUST the primary key and the fields to update (i.e., a CDT containing the primary key ID and the &amp;quot;isActive&amp;quot; flag, though usually I&amp;#39;d also include a &amp;quot;modified by user&amp;quot; and &amp;quot;modified date&amp;quot; field in this), which when re-written, only overwrites the fields contained in that CDT, and leaves the rest of the data in the row alone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "You should enter only a single query in a row." ???</title><link>https://community.appian.com/thread/111073?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2023 17:43:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fe64f5b9-6d6d-421d-add6-21aef018f99f</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="91576" url="~/discussions/f/general/28384/you-should-enter-only-a-single-query-in-a-row/111071#111071"]&amp;quot;Why in the &lt;strong&gt;world&lt;/strong&gt; do I need to send the full record for each record that I want to delete?&amp;quot;[/quote]
&lt;p&gt;Where does this idea come from?&amp;nbsp; The Delete from DSE node only takes identifiers, so if you&amp;#39;re actually deleting rows, this should never be a concern.&amp;nbsp; It would literally require exactly as much processing power as you&amp;#39;re already attempting to use above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "You should enter only a single query in a row." ???</title><link>https://community.appian.com/thread/111072?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2023 17:40:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:41b13cab-6c5e-4b91-850d-0c4b4cf8ffcf</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;What browser and web server are you talking about? Process logic is executed on the server only.&lt;/p&gt;
&lt;p&gt;And why do you want to load 200 pieces of data? Just get the IDs and put them into that node.&lt;/p&gt;
&lt;p&gt;This is low-code with Appian! Let simple things stay&amp;nbsp;simple. There is no reason to make things more complicated just because other languages or environments require it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "You should enter only a single query in a row." ???</title><link>https://community.appian.com/thread/111071?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2023 17:15:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1f25a217-0986-40bf-b271-bcd0e7e5e1a0</guid><dc:creator>petel0001</dc:creator><description>&lt;p&gt;The question I have is&amp;nbsp;&lt;br /&gt;&amp;quot;Why in the &lt;strong&gt;world&lt;/strong&gt; do I need to send the full record for each record that I want to delete?&amp;quot;&lt;br /&gt;&lt;br /&gt;Let&amp;#39;s say I have a table with 20 fields, and 100 records where I want to delete only 10 records.&lt;br /&gt;20 x 10 = 200 pieces data to save in the users&amp;#39; web browser and then send that to the web server.&lt;br /&gt;&lt;br /&gt;On the other hand, I want to delete the same 10 records, if I only capture the primary key then I only have to collect 10 pieces of data and send that to the web server.&lt;br /&gt;&lt;br /&gt;One of these two methods seems to use much more computer power and is not as efficient as the other.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "You should enter only a single query in a row." ???</title><link>https://community.appian.com/thread/111070?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2023 17:03:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:53ca472f-117b-4ec4-855d-6f27614b02f1</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The &amp;quot;Delete from DSE&amp;quot; setup is super simple, too.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1681491781278v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Side note: it&amp;#39;s advised to only delete DB rows when you&amp;#39;re *really really sure* you want them GONE.&amp;nbsp; Otherwise it&amp;#39;s a strongly-suggested best practice to simply include a flag on the row along the lines of &amp;quot;is active&amp;quot; (which you&amp;#39;d set to &amp;quot;false&amp;quot;) or &amp;quot;is deleted&amp;quot; (which you&amp;#39;d set to &amp;quot;true&amp;quot;) and write the modified row back to the DB.&amp;nbsp; These flags would then be able to be reflected in default-condition queries in the future to avoid showing them on the front end, other than for admin / auditing reasons.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "You should enter only a single query in a row." ???</title><link>https://community.appian.com/thread/111069?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2023 16:53:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7ae4bfd1-8f17-46aa-94ed-8e399f335d2b</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Why in the &lt;em&gt;&lt;strong&gt;world&lt;/strong&gt;&lt;/em&gt; are you using the Query Database node to do this?!&amp;nbsp; &lt;em&gt;Please please please&lt;/em&gt; just use the &amp;quot;Delete from DSE&amp;quot; node.&amp;nbsp; The QDB node should be used only in extreme circumstances, and even then I always recommend trying all other approaches first&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Anyway the actual answer to your question: the SQL statement consumed by this node isn&amp;#39;t expressionable and there&amp;#39;s no reason to think it can read Appian Expression code - the fact that it can swap in &amp;quot;ac!&amp;quot; values is the only exception to this and is, what I consider to be, a bare workaround. Still I would never, ever attempt what you&amp;#39;re attempting in your screenshot in this node.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>