<?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 dates problem in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233356#M54813</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to pull these dates form our Taradata datawarehouse in this format&amp;nbsp; 30APR2015 and it's a date9.&amp;nbsp;format&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying SAS SQL to pull trhe date but getting no results...error actually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried&amp;nbsp; :&lt;/P&gt;
&lt;P&gt;where date = '30APR2016'&lt;/P&gt;
&lt;P&gt;where date = '30APR2016'd&lt;/P&gt;
&lt;P&gt;where put (date, date9.) = '30APR2015'&lt;/P&gt;
&lt;P&gt;where put (date, yymmdd10.)= '30APR2015'&lt;/P&gt;
&lt;P&gt;where put (date, yymmdd9.)= '30APR2015'&lt;/P&gt;
&lt;P&gt;where input (date, yymmdd10.)= '30APR2015'&lt;/P&gt;
&lt;P&gt;where input (date, yymmdd9.)= '30APR2015'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nothing works...&lt;/P&gt;
&lt;P&gt;Got this error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Teradata prepare: Syntax error: Data Type "snap_dt" does not match a Defined Type name.&lt;/P&gt;
&lt;P&gt;SQL statement was: select * from ddwv01.MORTG_CLM_LOSS as LP where put(snap_dt, yymmdd9.)&lt;/P&gt;
&lt;P&gt;= '30APR2016'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions?&amp;nbsp; Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2015 21:52:31 GMT</pubDate>
    <dc:creator>podarum</dc:creator>
    <dc:date>2015-11-05T21:52:31Z</dc:date>
    <item>
      <title>dates problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233356#M54813</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to pull these dates form our Taradata datawarehouse in this format&amp;nbsp; 30APR2015 and it's a date9.&amp;nbsp;format&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying SAS SQL to pull trhe date but getting no results...error actually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried&amp;nbsp; :&lt;/P&gt;
&lt;P&gt;where date = '30APR2016'&lt;/P&gt;
&lt;P&gt;where date = '30APR2016'd&lt;/P&gt;
&lt;P&gt;where put (date, date9.) = '30APR2015'&lt;/P&gt;
&lt;P&gt;where put (date, yymmdd10.)= '30APR2015'&lt;/P&gt;
&lt;P&gt;where put (date, yymmdd9.)= '30APR2015'&lt;/P&gt;
&lt;P&gt;where input (date, yymmdd10.)= '30APR2015'&lt;/P&gt;
&lt;P&gt;where input (date, yymmdd9.)= '30APR2015'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nothing works...&lt;/P&gt;
&lt;P&gt;Got this error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Teradata prepare: Syntax error: Data Type "snap_dt" does not match a Defined Type name.&lt;/P&gt;
&lt;P&gt;SQL statement was: select * from ddwv01.MORTG_CLM_LOSS as LP where put(snap_dt, yymmdd9.)&lt;/P&gt;
&lt;P&gt;= '30APR2016'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions?&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 21:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233356#M54813</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2015-11-05T21:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: dates problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233358#M54814</link>
      <description>&lt;P&gt;I would pull the date in it's current format.&amp;nbsp; If you need to change it to date9. do it in SAS after you have the dataset.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 22:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233358#M54814</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-11-05T22:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: dates problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233365#M54815</link>
      <description>What does the rest of your query look like? Are you using pass through sql or proc sql or a data step?</description>
      <pubDate>Thu, 05 Nov 2015 23:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233365#M54815</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-05T23:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: dates problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233368#M54816</link>
      <description>&lt;P&gt;proc sql&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 23:33:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233368#M54816</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2015-11-05T23:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: dates problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233379#M54821</link>
      <description>Teradata typically stores dates as date times. &lt;BR /&gt;Try &lt;BR /&gt;&lt;BR /&gt;where datepart(date) = '30APR2016'd</description>
      <pubDate>Fri, 06 Nov 2015 03:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233379#M54821</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-06T03:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: dates problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233397#M54826</link>
      <description>&lt;P&gt;Start by doing a simple:&lt;/P&gt;
&lt;P&gt;create temp_dataset as select * from your_table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, goto your work library, and open the properties of the temp_dataset. &amp;nbsp;What format is the variable in question, what data does it hold? &amp;nbsp;Post a proc contents if your still having problems, and some of the data.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 09:43:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233397#M54826</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-11-06T09:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: dates problem</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233427#M54827</link>
      <description>&lt;P&gt;Thanks everyone...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt; WHERE&amp;nbsp;DATE = DATE&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;'2016-04-30'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 13:57:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/dates-problem/m-p/233427#M54827</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2015-11-06T13:57:21Z</dc:date>
    </item>
  </channel>
</rss>

