<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL/m-p/504569#M135049</link>
    <description>date ='04MAR2004'd&lt;BR /&gt;&lt;BR /&gt;You need the d after the quotes to tell SAS it's a date, not a character field.</description>
    <pubDate>Tue, 16 Oct 2018 02:20:48 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-10-16T02:20:48Z</dc:date>
    <item>
      <title>Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL/m-p/504568#M135048</link>
      <description>&lt;P&gt;proc format;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;value $dest&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'DFW'='Dallas/Forth Worth'&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'LAX'='Los Angeles'&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'ORD'="O'Haire"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'WAS'= 'DC-ALL Airports'&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'CDG'= 'De Gaulle'&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'CPH'= 'Copenhaugen'&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'FRA'='Frankfurt'&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'LHR'='London-Heathrow'&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'YYZ'='Toronto'&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Proc SQL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;create table ex1 AS&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;select distinct s.state as Staff_State,s.empid,sup.state as SUP_Sate,p.jobcode, put(f.destination,$DEST.) AS dest,f.date&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;from mysas.supervisors AS Sup&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;full Join mysas.staffmaster AS s ON s.empid=sup.empid&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;full Join mysas.payrollmaster as P ON s.empid=p.empid&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;full join mysas.flightschedule as f ON s.empid=f.empid&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;where destination in('CPH') and date ='04MAR2004'&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;;&lt;BR /&gt;quit;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I try to select destination and the date I am getting an error in the log: date is a numeric value with date9. format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasError"&gt;_____&lt;/DIV&gt;&lt;PRE class="sasLog"&gt; ERROR: Expression using equals (=) has components that are of different data types.&lt;/PRE&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 02:19:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL/m-p/504568#M135048</guid>
      <dc:creator>chrissowden</dc:creator>
      <dc:date>2018-10-16T02:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL/m-p/504569#M135049</link>
      <description>date ='04MAR2004'd&lt;BR /&gt;&lt;BR /&gt;You need the d after the quotes to tell SAS it's a date, not a character field.</description>
      <pubDate>Tue, 16 Oct 2018 02:20:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL/m-p/504569#M135049</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-16T02:20:48Z</dc:date>
    </item>
  </channel>
</rss>

