<?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: How do I translate sql to_char to sas code? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182283#M46435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do that..but if you do SAS won't be able to pass the query to Oracle for execution.&amp;nbsp; SAS would then pull all of the necessary information down locally to decide if a row met the datepart criteria.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Dec 2013 21:05:34 GMT</pubDate>
    <dc:creator>DBailey</dc:creator>
    <dc:date>2013-12-26T21:05:34Z</dc:date>
    <item>
      <title>How do I translate sql to_char to sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182279#M46431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to compare a datefield in an oracle table. Because of the field format, I have not been able to figure out a way to compare. I could really use some help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field data looks like this (named = Activity_attempt_dttm);&lt;/P&gt;&lt;P&gt;11JUN2008:16:06:09.111000&lt;/P&gt;&lt;P&gt;12JUN2008:13:54:18.749000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the basic sql I’m trying to use;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; login_user_id, activity_attempt_dttm, audit_remark_txt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; MAPTAB.SESA_SECURITY_AUDIT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; activity_attempt_dttm = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;"12JUN2008:13:54:18.749000"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The final solution for me is to be able to select data between a from date and a to date. I only need to compare the dates, not the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatful.&lt;/P&gt;&lt;P&gt;tbagger70&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 19:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182279#M46431</guid>
      <dc:creator>tbagger70</dc:creator>
      <dc:date>2013-12-26T19:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I translate sql to_char to sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182280#M46432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most SAS installations accessing oracle dates use a SAS datetime variable and the sas connector translates between SAS and Oracle requirements.&amp;nbsp; So..for a column that is defined as a date in Oracle you would simply use a datetime SAS variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; login_user_id, activity_attempt_dttm, audit_remark_txt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; MAPTAB.SESA_SECURITY_AUDIT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; activity_attempt_dttm = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;"12JUN2008:13:54:18.749000"dt&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;or &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; login_user_id, activity_attempt_dttm, audit_remark_txt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; MAPTAB.SESA_SECURITY_AUDIT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; activity_attempt_dttm GE'01Jun2008:0:0'dt &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and activity_attempt_dttm LT '01Jul2008:0:0'dt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 19:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182280#M46432</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2013-12-26T19:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I translate sql to_char to sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182281#M46433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&amp;nbsp; for the help dbailey. Saved me &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 19:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182281#M46433</guid>
      <dc:creator>tbagger70</dc:creator>
      <dc:date>2013-12-26T19:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I translate sql to_char to sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182282#M46434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you have mentioned that you want to select and filter only the &lt;STRONG&gt;Date and exclude the time,&lt;/STRONG&gt; I believe you would need to apply the &lt;STRONG&gt;DATEPART function&lt;/STRONG&gt; to extract the date and exclude the time, and then apply the filter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 19:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182282#M46434</guid>
      <dc:creator>NaveenSrinivasan</dc:creator>
      <dc:date>2013-12-26T19:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I translate sql to_char to sas code?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182283#M46435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do that..but if you do SAS won't be able to pass the query to Oracle for execution.&amp;nbsp; SAS would then pull all of the necessary information down locally to decide if a row met the datepart criteria.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 21:05:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-translate-sql-to-char-to-sas-code/m-p/182283#M46435</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2013-12-26T21:05:34Z</dc:date>
    </item>
  </channel>
</rss>

