<?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 Proc sql in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sql/m-p/331918#M22027</link>
    <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have got one requirement in which I need to fetch the data from the oracle tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lets suppose I have 5 years of data in the table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A loop will run for 5 years and when the loop continues for a year ,the subloop will run for 12 months and during the inner loop run ,month and year condition will be applied to the table (under proc sql) filter condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any example ,how to do this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 12 Feb 2017 03:15:51 GMT</pubDate>
    <dc:creator>sonaaas</dc:creator>
    <dc:date>2017-02-12T03:15:51Z</dc:date>
    <item>
      <title>Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sql/m-p/331918#M22027</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have got one requirement in which I need to fetch the data from the oracle tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lets suppose I have 5 years of data in the table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A loop will run for 5 years and when the loop continues for a year ,the subloop will run for 12 months and during the inner loop run ,month and year condition will be applied to the table (under proc sql) filter condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any example ,how to do this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 03:15:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sql/m-p/331918#M22027</guid>
      <dc:creator>sonaaas</dc:creator>
      <dc:date>2017-02-12T03:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sql/m-p/331919#M22028</link>
      <description>&lt;P&gt;No idea I'm afraid. Yet! Can you show some example data, and how you'd like it to appear. Otherwise we're just making random guesses.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 03:52:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sql/m-p/331919#M22028</guid>
      <dc:creator>LaurieF</dc:creator>
      <dc:date>2017-02-12T03:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sql/m-p/331933#M22029</link>
      <description>&lt;P&gt;See the examples in the Macro Appendix, Example 11 is a starter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/SAS-9-4-Macro-Language-Reference-Has-a-New-Appendix/ta-p/291716" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/SAS-9-4-Macro-Language-Reference-Has-a-New-Appendix/ta-p/291716&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, look into CALL EXECUTE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 07:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sql/m-p/331933#M22029</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-12T07:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sql/m-p/332073#M22032</link>
      <description>&lt;P&gt;You will need to be more specific in what you have and what you need in order for us to give you a detailed answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a high level: I'd probably consider to generate the SQL with all the filter conditions and then query the Oracle table only once. If you're going for some looping approach then make sure that your date variables in the filter condition are indexed as else you're heading for 5*12 full table scans which can lead to a very poor query performance.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 06:02:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sql/m-p/332073#M22032</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-02-13T06:02:29Z</dc:date>
    </item>
  </channel>
</rss>

