<?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 Re: Inserting datatime values in sql server in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Inserting-datatime-values-in-sql-server/m-p/598669#M16341</link>
    <description>&lt;P&gt;When I did a web search for the error message you posted, the 2nd link I found looks like it might be of help - "Problem Note 62503: An error is returned when you try to add datetime values to an SQL Server table using a libref with SAS/ACCESS® Interface to OLE DB":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/62/503.html" target="_blank"&gt;http://support.sas.com/kb/62/503.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2019 11:45:49 GMT</pubDate>
    <dc:creator>Amir</dc:creator>
    <dc:date>2019-10-23T11:45:49Z</dc:date>
    <item>
      <title>Inserting datatime values in sql server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Inserting-datatime-values-in-sql-server/m-p/598649#M16337</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;z='&lt;SPAN&gt;2019-10-23 00:00:00.000000'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to insert this value character value&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;2019-10-23 00:00:00.000000&amp;nbsp; by putting in a macro variable x in to a sql server table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;call symput ('x',z)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the column that i am ineserting is OP_DATO which is defined as datetime2(6) in sql server&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when i am inserting through sas 9.4 i am getting this error&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Value 1 on the SELECT clause does not match the data type of the corresponding column listed after the INSERT table name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this a problem with SAS 9.4 because it was working with SAS 9.2 .what is the solution for sas 9.4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 09:55:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Inserting-datatime-values-in-sql-server/m-p/598649#M16337</guid>
      <dc:creator>shubham1</dc:creator>
      <dc:date>2019-10-23T09:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting datatime values in sql server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Inserting-datatime-values-in-sql-server/m-p/598667#M16339</link>
      <description>&lt;P&gt;If it used to work before then check the order of the variables in your data set when compared with the order of the values in the insert statement, as described in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/SQL-insert-error/td-p/77278" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/SQL-insert-error/td-p/77278&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that is not the solution then please post the code you are using with some example data that can be inserted into an example data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 11:41:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Inserting-datatime-values-in-sql-server/m-p/598667#M16339</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2019-10-23T11:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting datatime values in sql server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Inserting-datatime-values-in-sql-server/m-p/598669#M16341</link>
      <description>&lt;P&gt;When I did a web search for the error message you posted, the 2nd link I found looks like it might be of help - "Problem Note 62503: An error is returned when you try to add datetime values to an SQL Server table using a libref with SAS/ACCESS® Interface to OLE DB":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/62/503.html" target="_blank"&gt;http://support.sas.com/kb/62/503.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 11:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Inserting-datatime-values-in-sql-server/m-p/598669#M16341</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2019-10-23T11:45:49Z</dc:date>
    </item>
  </channel>
</rss>

