<?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 Question in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Question/m-p/30279#M7170</link>
    <description>Kevin;&lt;BR /&gt;
&lt;BR /&gt;
for Oracle passthru one can use a macro variable ...&lt;BR /&gt;
&lt;BR /&gt;
%let FY_YEAR=2008&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
CREATE TABLE C AS SELECT * FROM CONNECTION TO DB2 (&lt;BR /&gt;
SELECT ENTITYID AS EID, BEGIN_DATE&lt;BR /&gt;
FROM ADUADS01.ADVTB914&lt;BR /&gt;
WHERE BEGIN_DATE &amp;gt; &amp;amp;FY_YEAR&lt;BR /&gt;
FOR READ ONLY);</description>
    <pubDate>Wed, 09 Jul 2008 20:14:48 GMT</pubDate>
    <dc:creator>Bill</dc:creator>
    <dc:date>2008-07-09T20:14:48Z</dc:date>
    <item>
      <title>Proc SQL Question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Question/m-p/30278#M7169</link>
      <description>I am using Proc SQL to retrieve Begin_Date greater then FY_Year.  Begin_Date is in the table the Proc SQL is using.  But the FY_Year is a calculated value in the SAS program.  How can I reference the FY_Year in my query?&lt;BR /&gt;
&lt;BR /&gt;
here is what i currently have:&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
CREATE TABLE C AS SELECT * FROM CONNECTION TO DB2 (&lt;BR /&gt;
    SELECT ENTITYID AS EID, BEGIN_DATE&lt;BR /&gt;
     FROM ADUADS01.ADVTB914&lt;BR /&gt;
    WHERE BEGIN_DATE &amp;gt; FY_YEAR&lt;BR /&gt;
      FOR READ ONLY);&lt;BR /&gt;
&lt;BR /&gt;
I am getting a error on the where.  Whats the proper way to reference FY_YEAR?&lt;BR /&gt;
&lt;BR /&gt;
Thank you soo much for any input!!&lt;BR /&gt;
Kevin</description>
      <pubDate>Wed, 09 Jul 2008 17:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Question/m-p/30278#M7169</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2008-07-09T17:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Question/m-p/30279#M7170</link>
      <description>Kevin;&lt;BR /&gt;
&lt;BR /&gt;
for Oracle passthru one can use a macro variable ...&lt;BR /&gt;
&lt;BR /&gt;
%let FY_YEAR=2008&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
CREATE TABLE C AS SELECT * FROM CONNECTION TO DB2 (&lt;BR /&gt;
SELECT ENTITYID AS EID, BEGIN_DATE&lt;BR /&gt;
FROM ADUADS01.ADVTB914&lt;BR /&gt;
WHERE BEGIN_DATE &amp;gt; &amp;amp;FY_YEAR&lt;BR /&gt;
FOR READ ONLY);</description>
      <pubDate>Wed, 09 Jul 2008 20:14:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Question/m-p/30279#M7170</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2008-07-09T20:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Question/m-p/30280#M7171</link>
      <description>Thank you Bill !</description>
      <pubDate>Wed, 09 Jul 2008 21:25:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Question/m-p/30280#M7171</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2008-07-09T21:25:07Z</dc:date>
    </item>
  </channel>
</rss>

