<?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 SQL delete and update in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SQL-delete-and-update/m-p/235037#M54994</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have a problem when i run a sas code it will delete the current table and insert into same table like in example below but the problem is its changing all the&amp;nbsp;dates format to&amp;nbsp;1960-01-01 05:38:21.000&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can anyone pls help&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have used below query&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt; delete from sqldb.xy;&lt;BR /&gt; insert into sqldb.xy&lt;BR /&gt; select * from price.yz&lt;BR /&gt; ;&lt;BR /&gt; quit;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2015 15:24:20 GMT</pubDate>
    <dc:creator>chennupriya</dc:creator>
    <dc:date>2015-11-17T15:24:20Z</dc:date>
    <item>
      <title>SQL delete and update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SQL-delete-and-update/m-p/235037#M54994</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have a problem when i run a sas code it will delete the current table and insert into same table like in example below but the problem is its changing all the&amp;nbsp;dates format to&amp;nbsp;1960-01-01 05:38:21.000&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can anyone pls help&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have used below query&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt; delete from sqldb.xy;&lt;BR /&gt; insert into sqldb.xy&lt;BR /&gt; select * from price.yz&lt;BR /&gt; ;&lt;BR /&gt; quit;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 15:24:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SQL-delete-and-update/m-p/235037#M54994</guid>
      <dc:creator>chennupriya</dc:creator>
      <dc:date>2015-11-17T15:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: SQL delete and update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SQL-delete-and-update/m-p/235045#M54996</link>
      <description>&lt;P&gt;By any chance is any of this data in another database such as Oracle, DB2 or SQL server?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a lot of systems out there that say something is a "date" but is actually a datetime. The specific value you show makes me beleive that you actually have a date, 08/01/2015,&amp;nbsp;as a value being inserted into something that is expecting a datetime value.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 15:45:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SQL-delete-and-update/m-p/235045#M54996</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-17T15:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: SQL delete and update</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SQL-delete-and-update/m-p/235048#M54998</link>
      <description>&lt;P&gt;yes you are rite but for first time its working fine and loading correct dates i mean&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE sqldb.xy &amp;nbsp;AS&lt;BR /&gt;SELECT&amp;nbsp;&lt;BR /&gt;FROM price.yz;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;/*inorder to update table in sql */&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt; delete from sqldb.xy;&lt;BR /&gt; insert into sqldb.xy&lt;BR /&gt; select * from price.yz&lt;BR /&gt; ;&lt;BR /&gt; quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for the first time ia m using proc sql create table in sql but once the table is created in sql then when i run second time i am just deleteing table and inserting rows into same table but when i am doing secong procedure teh dtae format changes pls explain&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 15:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SQL-delete-and-update/m-p/235048#M54998</guid>
      <dc:creator>chennupriya</dc:creator>
      <dc:date>2015-11-17T15:49:11Z</dc:date>
    </item>
  </channel>
</rss>

