<?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: Teradata DATE and DATETIMESTAMP into ORACLE DATE and DATETIMESTAMP using PROC SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Teradata-DATE-and-DATETIMESTAMP-into-ORACLE-DATE-and/m-p/881239#M348194</link>
    <description>&lt;P&gt;Have a read of&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/p06jk0u30uhuj5n18fqw9sxr25lk.htm" target="_self"&gt;Data Types for Oracle&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1686974243473.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85120i0D18432F548382F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1686974243473.png" alt="Patrick_0-1686974243473.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you want full control what data types you get in the Oracle table - i.e. not just TIMESTAMP but TIMESTAMP(6) then use explicit SQL passthrough and create the Oracle table explicitly before loading into it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the Oracle documentation the default for TIMESTAMP is TIMESTAMP(6) so you should be fine even if leaving the job to SAS.&lt;/P&gt;
&lt;P&gt;The SAS docu states for automatic conversion "any date, time,....format...": In my experience with no more current releases of SAS things didn't work as expected with formats other than Date and DateTime. But may-be that's fixed now.&lt;/P&gt;</description>
    <pubDate>Sat, 17 Jun 2023 04:06:43 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2023-06-17T04:06:43Z</dc:date>
    <item>
      <title>Teradata DATE and DATETIMESTAMP into ORACLE DATE and DATETIMESTAMP using PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Teradata-DATE-and-DATETIMESTAMP-into-ORACLE-DATE-and/m-p/881109#M348165</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to read one of the Teradata table DATE and DATETIME column values into SAS and then need to load into the ORACLE table DATE and DATETIMETSMAP columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying as below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;connect to teradata(&amp;amp;myconnections.);&lt;/P&gt;
&lt;P&gt;create table src1 as select * from connection to teradata (select dt1,dt_ts1 from tab1);&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;proc print data=src1;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dt1&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; dt_ts1&lt;/P&gt;
&lt;P&gt;16JUN2023&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16JUN2023:06:41:05.655255&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also below are proc contents output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#&amp;nbsp; Variable Type&amp;nbsp; &amp;nbsp; Len&amp;nbsp; &amp;nbsp;Format&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Informat&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; dt1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Num&amp;nbsp; &amp;nbsp; &amp;nbsp;8&amp;nbsp; &amp;nbsp; &amp;nbsp;DATE9.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATE9.&amp;nbsp;&lt;BR /&gt;2&amp;nbsp; &amp;nbsp;dt_ts1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Num&amp;nbsp; &amp;nbsp; &amp;nbsp;8&amp;nbsp; &amp;nbsp; &amp;nbsp;DATETIME26.6&amp;nbsp; &amp;nbsp;DATETIME26.6&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help me how can I load above two date values into Oracle table with data types: DATE and TIMESTAMP(6). Thank you so much In advance.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 14:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Teradata-DATE-and-DATETIMESTAMP-into-ORACLE-DATE-and/m-p/881109#M348165</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2023-06-16T14:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Teradata DATE and DATETIMESTAMP into ORACLE DATE and DATETIMESTAMP using PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Teradata-DATE-and-DATETIMESTAMP-into-ORACLE-DATE-and/m-p/881232#M348191</link>
      <description>When I tried to insert data into oracle table I can values like 14JUN13. Loading date values with 10 years back. Please suggest if I need to use any formats.</description>
      <pubDate>Sat, 17 Jun 2023 01:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Teradata-DATE-and-DATETIMESTAMP-into-ORACLE-DATE-and/m-p/881232#M348191</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2023-06-17T01:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Teradata DATE and DATETIMESTAMP into ORACLE DATE and DATETIMESTAMP using PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Teradata-DATE-and-DATETIMESTAMP-into-ORACLE-DATE-and/m-p/881234#M348193</link>
      <description>&lt;P&gt;Example of what you tried.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should work normally.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname td teradata ..... ;
proc sql;
insert into td.td_table (date,datetime)
  select date,datetime 
  from saslib.sas_dataset
;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Jun 2023 01:34:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Teradata-DATE-and-DATETIMESTAMP-into-ORACLE-DATE-and/m-p/881234#M348193</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-17T01:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Teradata DATE and DATETIMESTAMP into ORACLE DATE and DATETIMESTAMP using PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Teradata-DATE-and-DATETIMESTAMP-into-ORACLE-DATE-and/m-p/881239#M348194</link>
      <description>&lt;P&gt;Have a read of&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/p06jk0u30uhuj5n18fqw9sxr25lk.htm" target="_self"&gt;Data Types for Oracle&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1686974243473.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85120i0D18432F548382F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1686974243473.png" alt="Patrick_0-1686974243473.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you want full control what data types you get in the Oracle table - i.e. not just TIMESTAMP but TIMESTAMP(6) then use explicit SQL passthrough and create the Oracle table explicitly before loading into it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the Oracle documentation the default for TIMESTAMP is TIMESTAMP(6) so you should be fine even if leaving the job to SAS.&lt;/P&gt;
&lt;P&gt;The SAS docu states for automatic conversion "any date, time,....format...": In my experience with no more current releases of SAS things didn't work as expected with formats other than Date and DateTime. But may-be that's fixed now.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Jun 2023 04:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Teradata-DATE-and-DATETIMESTAMP-into-ORACLE-DATE-and/m-p/881239#M348194</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-06-17T04:06:43Z</dc:date>
    </item>
  </channel>
</rss>

