<?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 Loading sas date into sql server in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235058#M43028</link>
    <description>&lt;P&gt;Loading SAS Date into SQL server. - Google Groups&lt;/P&gt;
&lt;DIV class="IVILX2C-f-F"&gt;
&lt;DIV class="IVILX2C-f-x"&gt;
&lt;DIV class="IVILX2C-f-l IVILX2C-f-e"&gt;
&lt;DIV class="IVILX2C-b-D"&gt;
&lt;DIV class="IVILX2C-f-G"&gt;
&lt;DIV class="IVILX2C-sb-p IVILX2C-sb-Z"&gt;
&lt;DIV class="IVILX2C-sb-H"&gt;
&lt;DIV class="IVILX2C-b-Ab"&gt;
&lt;DIV&gt;
&lt;DIV class="IVILX2C-b-F"&gt;
&lt;DIV&gt;
&lt;DIV class="IVILX2C-b-G"&gt;
&lt;DIV id="tm-tl" class="IVILX2C-sb-M"&gt;
&lt;DIV class="IVILX2C-tb-W IVILX2C-tb-Y IVILX2C-b-Db IVILX2C-tb-X" tabindex="0"&gt;
&lt;DIV class="IVILX2C-tb-W"&gt;
&lt;DIV class="IVILX2C-tb-F"&gt;
&lt;DIV class="IVILX2C-tb-x"&gt;
&lt;DIV class="IVILX2C-fd-a"&gt;
&lt;DIV class="IVILX2C-tb-P" tabindex="0"&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV dir="ltr"&gt;I'm trying to load SAS date(format DATE9.,informat 8 int) into sql server database DATE column using ODBC connection. &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libname xxx ODBC DSN=xxxxxx bulkload=yes ; &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proc sql; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT into sqldb.tablename&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select * from xy.sales; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quit; &lt;BR /&gt;&lt;BR /&gt;ERROR: Value 1 on the SELECT clause does not match the data type of the corresponding column listed after the INSERT table name.&lt;/DIV&gt;
&lt;DIV dir="ltr"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir="ltr"&gt;my sas date format is MMDDYY10.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I appreciate any help on this. &lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 17 Nov 2015 16:31:05 GMT</pubDate>
    <dc:creator>chennupriya</dc:creator>
    <dc:date>2015-11-17T16:31:05Z</dc:date>
    <item>
      <title>Loading sas date into sql server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235058#M43028</link>
      <description>&lt;P&gt;Loading SAS Date into SQL server. - Google Groups&lt;/P&gt;
&lt;DIV class="IVILX2C-f-F"&gt;
&lt;DIV class="IVILX2C-f-x"&gt;
&lt;DIV class="IVILX2C-f-l IVILX2C-f-e"&gt;
&lt;DIV class="IVILX2C-b-D"&gt;
&lt;DIV class="IVILX2C-f-G"&gt;
&lt;DIV class="IVILX2C-sb-p IVILX2C-sb-Z"&gt;
&lt;DIV class="IVILX2C-sb-H"&gt;
&lt;DIV class="IVILX2C-b-Ab"&gt;
&lt;DIV&gt;
&lt;DIV class="IVILX2C-b-F"&gt;
&lt;DIV&gt;
&lt;DIV class="IVILX2C-b-G"&gt;
&lt;DIV id="tm-tl" class="IVILX2C-sb-M"&gt;
&lt;DIV class="IVILX2C-tb-W IVILX2C-tb-Y IVILX2C-b-Db IVILX2C-tb-X" tabindex="0"&gt;
&lt;DIV class="IVILX2C-tb-W"&gt;
&lt;DIV class="IVILX2C-tb-F"&gt;
&lt;DIV class="IVILX2C-tb-x"&gt;
&lt;DIV class="IVILX2C-fd-a"&gt;
&lt;DIV class="IVILX2C-tb-P" tabindex="0"&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV dir="ltr"&gt;I'm trying to load SAS date(format DATE9.,informat 8 int) into sql server database DATE column using ODBC connection. &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libname xxx ODBC DSN=xxxxxx bulkload=yes ; &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proc sql; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT into sqldb.tablename&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select * from xy.sales; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quit; &lt;BR /&gt;&lt;BR /&gt;ERROR: Value 1 on the SELECT clause does not match the data type of the corresponding column listed after the INSERT table name.&lt;/DIV&gt;
&lt;DIV dir="ltr"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir="ltr"&gt;my sas date format is MMDDYY10.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I appreciate any help on this. &lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Nov 2015 16:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235058#M43028</guid>
      <dc:creator>chennupriya</dc:creator>
      <dc:date>2015-11-17T16:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Loading sas date into sql server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235062#M43029</link>
      <description>&lt;P&gt;Are&amp;nbsp;you sure that xy.sales has the exact column order as sqldb.tablename?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options sastrace=',,,d' sastraceloc=saslog;&lt;/P&gt;
&lt;P&gt;might reveal any incnsistency between SAS and SQL Server.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 16:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235062#M43029</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-11-17T16:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Loading sas date into sql server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235066#M43030</link>
      <description>&lt;P&gt;please check this post&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/Uploading-data-to-SQL-server-issue-with-Date-variable/m-p/172158#M44397" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Uploading-data-to-SQL-server-issue-with-Date-variable/m-p/172158#M44397&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the same problem as the dates coverting to 1960 when updating a table in sql server from sas&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pls help me&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 16:43:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235066#M43030</guid>
      <dc:creator>chennupriya</dc:creator>
      <dc:date>2015-11-17T16:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Loading sas date into sql server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235101#M43036</link>
      <description>&lt;P&gt;What format do you have on your SAS date column and what is the data type of the column you are trying to load the date into?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are loading an SQL Server datetime column then the SAS column must have a DATETIME format applied.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 18:37:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235101#M43036</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-11-17T18:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Loading sas date into sql server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235117#M43041</link>
      <description>&lt;P&gt;Why do you start&amp;nbsp; a new post?&lt;/P&gt;
&lt;P&gt;Not sure what you tried so far.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;I created a table in SQL server with date columns&lt;/LI&gt;
&lt;LI&gt;In SQL Server, inserted data into it, with datatime columns casted to date&lt;/LI&gt;
&lt;LI&gt;Queried the data in SQL Server, date columns looks fine&lt;/LI&gt;
&lt;LI&gt;Assigning libname in SAS. date columns appear with date9. format - values looks perfect.&lt;/LI&gt;
&lt;LI&gt;Created a transaction row in SAS, with SAS date values.&lt;/LI&gt;
&lt;LI&gt;Appended the data to the SQL Server table. New date values looks good.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you have verified that all those steps, and you still have a problem - open a track to SAS tech support.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 19:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Loading-sas-date-into-sql-server/m-p/235117#M43041</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-11-17T19:13:51Z</dc:date>
    </item>
  </channel>
</rss>

