<?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: PROC SQL Oracle Table Build - Date formatting to ddmmyys10. ??? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/333627#M22168</link>
    <description>&lt;P&gt;I've had lots of problems with Oracle-SAS data type as well, although I'm usually going the other direction, from Oracle to SAS, and date/time variables are always the trickiest. One thing I've noticed that may be helpful is that there seems to be a big difference in the interchange between Oracle and SAS depending on if the variable is a DATE, TIME or DATETIME in SAS or if it's a DATE, TIMESTAMP or TIMESTAMP WITH TIME ZONE in Oracle. &amp;nbsp;It looks like below it's using a SAS DATE format, but if it's not too much of a hassle it may be worth converting it to a DATETIME and see what Oracle makes of it on the upload. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One other thing to consider, if on upload the SAS DATE variables are DATE or TIMESTAMP values rather than a VARCHAR2, is that you may be able to change the schema parameters in Oracle to alter the default DATE/TIMESTAMP format it displays. &amp;nbsp;I don't recall how to do this off the top of my head, but I don't think it should be too hard to find.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2017 23:37:34 GMT</pubDate>
    <dc:creator>Sven111</dc:creator>
    <dc:date>2017-02-16T23:37:34Z</dc:date>
    <item>
      <title>PROC SQL Oracle Table Build - Date formatting to ddmmyys10. ???</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/332562#M22092</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First time post - usually I can find an anwer by seaching the forums, but I've struggled on this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've built a WORK.OUTPUT table in EG with some date columns with a dd/mm/yyyy format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm then using a&amp;nbsp;Program with PROC SQL to create a table in Oracle based upon the WORK.OUTPUT table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I do this, all the dates are defaulting to SAS styled format: DD-MON-YY in the Oracle table. How do I get PROC SQL to build the table in oracle with dd/mm/yyyy date formats? I've tried both:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;create&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ORACLELIB.NEW_TABLE &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;FROM WORK.OUTPUT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;QUIT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;create&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ORACLELIB.NEW_TABLE &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;ITEM 1&lt;/P&gt;&lt;P&gt;,ITEM 2&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;,DATE_1 format=&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;ddmmyys10.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;,DATE_2 format=&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;ddmmyys10.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;FROM WORK.OUTPUT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Courier New" size="3"&gt;QUIT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone able to help?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 11:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/332562#M22092</guid>
      <dc:creator>TarquinKrikery</dc:creator>
      <dc:date>2017-02-14T11:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Oracle Table Build - Date formatting to ddmmyys10. ???</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/332572#M22096</link>
      <description>&lt;P&gt;The Oracle standard display format is an issue for Oracle. if you need to change that, talk to your Oracle DBA.&lt;/P&gt;
&lt;P&gt;Why the concern, is the table&amp;nbsp;directly available for end user reporting?&lt;/P&gt;
&lt;P&gt;If you have a Metadata server, you can register the desired format there, and then it will be used if the user are using the META engine.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 12:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/332572#M22096</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-02-14T12:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Oracle Table Build - Date formatting to ddmmyys10. ???</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/332574#M22097</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yeah the Oracle table is used for end reporting with the date output desired/required in dd/mm/yyyy format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Was hoping it would be an easy fix I could do in the output from SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll see what our DBA says then, it'll probably only take 2 weeks for them to get back to me lol.... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 12:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/332574#M22097</guid>
      <dc:creator>TarquinKrikery</dc:creator>
      <dc:date>2017-02-14T12:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Oracle Table Build - Date formatting to ddmmyys10. ???</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/332575#M22098</link>
      <description>&lt;P&gt;It would&amp;nbsp;be an easy fix if you had a metadata server....&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;
&lt;P&gt;Another quickie would&amp;nbsp;be to use a SAS view on top of the Oracle table. Not ideal, but it would work.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 12:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/332575#M22098</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-02-14T12:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Oracle Table Build - Date formatting to ddmmyys10. ???</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/333627#M22168</link>
      <description>&lt;P&gt;I've had lots of problems with Oracle-SAS data type as well, although I'm usually going the other direction, from Oracle to SAS, and date/time variables are always the trickiest. One thing I've noticed that may be helpful is that there seems to be a big difference in the interchange between Oracle and SAS depending on if the variable is a DATE, TIME or DATETIME in SAS or if it's a DATE, TIMESTAMP or TIMESTAMP WITH TIME ZONE in Oracle. &amp;nbsp;It looks like below it's using a SAS DATE format, but if it's not too much of a hassle it may be worth converting it to a DATETIME and see what Oracle makes of it on the upload. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One other thing to consider, if on upload the SAS DATE variables are DATE or TIMESTAMP values rather than a VARCHAR2, is that you may be able to change the schema parameters in Oracle to alter the default DATE/TIMESTAMP format it displays. &amp;nbsp;I don't recall how to do this off the top of my head, but I don't think it should be too hard to find.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 23:37:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/333627#M22168</guid>
      <dc:creator>Sven111</dc:creator>
      <dc:date>2017-02-16T23:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Oracle Table Build - Date formatting to ddmmyys10. ???</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/333718#M22182</link>
      <description>&lt;P&gt;Thanks for the info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dates/times are a royal faff between systems aren't they!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately as it's SAS which is dropping/creating the table each time (we have an easy prompt-run EGP which pulls data, formats, adds info then drops/re-writes a table), it means getting Oracle to do any sort of converting/formatting is off the menu.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate all the suggestions but given this scenario, if I can't get SAS to do this via PROC SQL then I think I'll have to just live with it and remember to reformat everything when we use the table for producing reports!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all the suggestions info though everyone!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 09:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-Oracle-Table-Build-Date-formatting-to-ddmmyys10/m-p/333718#M22182</guid>
      <dc:creator>TarquinKrikery</dc:creator>
      <dc:date>2017-02-17T09:44:42Z</dc:date>
    </item>
  </channel>
</rss>

