<?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 need help with SQL query</title><link>https://community.appian.com/discussions/f/data/18359/i-need-help-with-sql-query</link><description>I have a table where the date of new_value get reflected on old_value columns. 
 These values are configured on query_entity while writing to table but missing the desired value for few columns. 
 But for few columns, the date was not displayed, so i</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: I need help with SQL query</title><link>https://community.appian.com/thread/72292?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 17:36:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ecde326d-74c9-4712-9e34-80303040ba2b</guid><dc:creator>Malleswari Talakola</dc:creator><description>&lt;p&gt;Will try it out.&lt;/p&gt;
&lt;p&gt;Thank you so much for your response&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I need help with SQL query</title><link>https://community.appian.com/thread/72291?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 17:32:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5892c22f-c455-447f-af4d-d2c08e8ac6f7</guid><dc:creator>Justin Watts</dc:creator><description>&lt;pre class="lang-sql prettyprint prettyprinted"&gt;&lt;code&gt;&lt;span class="pln"&gt;Yes. Try CAST&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;myDateTime&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;AS&lt;/span&gt;&lt;span class="pln"&gt; DATE&lt;/span&gt;&lt;span class="pun"&gt;), so:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;UPDATE &amp;lt;YOUR_TABLE_NAME&amp;gt; SET OLD_VALUE = CONCAT(OLD_VALUE,&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;CAST&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;myDateTime&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;AS&lt;/span&gt;&lt;span class="pln"&gt; DATE&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;code&gt;&lt;span class="pun"&gt;&lt;span&gt;) WHERE OLD_VALUE NOT LIKE &amp;#39;%/%&amp;#39; AND FIELD_NAME=&amp;#39;Status&amp;#39;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;If you need to format the date afterwards, then something like Date_Format(CAST(MYDATETIME AS DATE),&amp;#39;%m/%d/%y&amp;#39;) could work. Simple example below:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1582306345799v1.png" alt=" " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I need help with SQL query</title><link>https://community.appian.com/thread/72290?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 17:23:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ae1f40ff-5585-4af4-9658-da12df128bf7</guid><dc:creator>Malleswari Talakola</dc:creator><description>&lt;p&gt;Thank you so much,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the query you provided worked but the date i want to reflect is on dateTime while i want only date to be refleted without time.&lt;/p&gt;
&lt;p&gt;Can that be achieved?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I need help with SQL query</title><link>https://community.appian.com/thread/72289?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 17:18:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7b11266-5add-4e13-bd7c-6c71d35488f1</guid><dc:creator>Justin Watts</dc:creator><description>&lt;p&gt;Assuming you want raw SQL, something like this might work:&lt;/p&gt;
&lt;p&gt;UPDATE &amp;lt;YOUR_TABLE_NAME&amp;gt; SET OLD_VALUE = CONCAT(OLD_VALUE,&amp;lt;SOME DATE&amp;gt;) WHERE OLD_VALUE NOT LIKE &amp;#39;%/%&amp;#39; AND FIELD_NAME=&amp;#39;Status&amp;#39;;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I need help with SQL query</title><link>https://community.appian.com/thread/72287?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 14:52:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:26ff7f5d-40c1-488d-b937-58f65c78c9b9</guid><dc:creator>Malleswari Talakola</dc:creator><description>&lt;p&gt;Also, FIELD_NAME = &amp;#39;Status&amp;#39;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>