<?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 converting sql query into sas proc sql in Developers</title>
    <link>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378127#M5446</link>
    <description>&lt;P&gt;need help to convert &amp;nbsp;below sql query into proc sql or data set query of sas&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Select x.*&lt;BR /&gt;from yyy&amp;nbsp;x&lt;BR /&gt;inner join&lt;BR /&gt;(&lt;BR /&gt;select abc, ad, min(date) as Minad&lt;BR /&gt;from dbo.xx&lt;BR /&gt;where&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;xx&amp;nbsp;&lt;/SPAN&gt;in ('xx' ,'&lt;SPAN&gt;xx&lt;/SPAN&gt;' ,'&lt;SPAN&gt;xx&lt;/SPAN&gt;' ) AND Activity_Date &amp;gt;= 'mm/dd/yyyy'&lt;BR /&gt;group by case_ID, Activity&lt;BR /&gt;)&lt;BR /&gt;as b on a.abc = b.abc and a.ad=b.Minad&lt;BR /&gt;where (a.ad)&amp;gt;= '&lt;SPAN&gt;mm/dd/yyyy&lt;/SPAN&gt;' and a.abc in ('xx' ,'xx' ,'xx' ) AND B.xx&amp;nbsp; IS NOT NULL&lt;BR /&gt;group by a.abc,a.xx,b.xx&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jul 2017 13:26:24 GMT</pubDate>
    <dc:creator>lakshya</dc:creator>
    <dc:date>2017-07-21T13:26:24Z</dc:date>
    <item>
      <title>sql query conversion to proc sql</title>
      <link>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378125#M5444</link>
      <description>&lt;P&gt;need help to convert &amp;nbsp;below sql query into proc sql or data set query of sas&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Select x.*&lt;BR /&gt;from yyy&amp;nbsp;x&lt;BR /&gt;inner join&lt;BR /&gt;(&lt;BR /&gt;select abc, ad, min(date) as Minad&lt;BR /&gt;from dbo.xx&lt;BR /&gt;where &lt;SPAN&gt;xx&amp;nbsp;&lt;/SPAN&gt;in ('xx' ,'&lt;SPAN&gt;xx&lt;/SPAN&gt;' ,'&lt;SPAN&gt;xx&lt;/SPAN&gt;' ) AND Activity_Date &amp;gt;= 'mm/dd/yyyy'&lt;BR /&gt;group by case_ID, Activity&lt;BR /&gt;)&lt;BR /&gt;as b on a.abc = b.abc and a.ad=b.Minad&lt;BR /&gt;where (a.ad)&amp;gt;= '&lt;SPAN&gt;mm/dd/yyyy&lt;/SPAN&gt;' and a.abc in ('xx' ,'xx' ,'xx' ) AND B.xx&amp;nbsp; IS NOT NULL&lt;BR /&gt;group by a.abc,a.xx,b.xx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 13:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378125#M5444</guid>
      <dc:creator>lakshya</dc:creator>
      <dc:date>2017-07-21T13:22:03Z</dc:date>
    </item>
    <item>
      <title>converting sql query into sas proc sql</title>
      <link>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378127#M5446</link>
      <description>&lt;P&gt;need help to convert &amp;nbsp;below sql query into proc sql or data set query of sas&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Select x.*&lt;BR /&gt;from yyy&amp;nbsp;x&lt;BR /&gt;inner join&lt;BR /&gt;(&lt;BR /&gt;select abc, ad, min(date) as Minad&lt;BR /&gt;from dbo.xx&lt;BR /&gt;where&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;xx&amp;nbsp;&lt;/SPAN&gt;in ('xx' ,'&lt;SPAN&gt;xx&lt;/SPAN&gt;' ,'&lt;SPAN&gt;xx&lt;/SPAN&gt;' ) AND Activity_Date &amp;gt;= 'mm/dd/yyyy'&lt;BR /&gt;group by case_ID, Activity&lt;BR /&gt;)&lt;BR /&gt;as b on a.abc = b.abc and a.ad=b.Minad&lt;BR /&gt;where (a.ad)&amp;gt;= '&lt;SPAN&gt;mm/dd/yyyy&lt;/SPAN&gt;' and a.abc in ('xx' ,'xx' ,'xx' ) AND B.xx&amp;nbsp; IS NOT NULL&lt;BR /&gt;group by a.abc,a.xx,b.xx&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 13:26:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378127#M5446</guid>
      <dc:creator>lakshya</dc:creator>
      <dc:date>2017-07-21T13:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: sql query conversion to proc sql</title>
      <link>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378130#M5445</link>
      <description>&lt;P&gt;I do not completly understand the query. But most of it should work in Proc SQL too. Except few changes where you mention date columns and at is not null.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Activity_Date &amp;gt;= 'mm/dd/yyyy'&lt;/P&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;P&gt;Activity_Date &amp;gt;= 'ddmmmyyyy'd&amp;nbsp; example '21jul2017'd&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is not null&lt;/P&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;P&gt;is not missing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 13:35:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378130#M5445</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-07-21T13:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: converting sql query into sas proc sql</title>
      <link>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378137#M5447</link>
      <description>&lt;P&gt;As I read it, there is nothing in your code not supported by PROC SQL in SAS, so simply wrap it inside a PROC SQL call.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 13:41:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378137#M5447</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-07-21T13:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: converting sql query into sas proc sql</title>
      <link>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378142#M5448</link>
      <description>&lt;P&gt;If activity_date and ad are SAS dates, and 'mm/dd/yy' are actually numbers, you should use the form:&lt;/P&gt;
&lt;PRE&gt;AND Activity_Date &amp;gt;= 'ddmonyyyy'd&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 13:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378142#M5448</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-07-21T13:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: converting sql query into sas proc sql</title>
      <link>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378147#M5449</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;good catch &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 13:51:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378147#M5449</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-07-21T13:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: converting sql query into sas proc sql</title>
      <link>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378148#M5450</link>
      <description>But it's not working so syntax error&lt;BR /&gt;It gives syntax error&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Jul 2017 13:51:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378148#M5450</guid>
      <dc:creator>lakshya</dc:creator>
      <dc:date>2017-07-21T13:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: converting sql query into sas proc sql</title>
      <link>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378154#M5451</link>
      <description>&lt;P&gt;What error appears in the&amp;nbsp;log?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 13:56:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378154#M5451</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-07-21T13:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: converting sql query into sas proc sql</title>
      <link>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378201#M5452</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post your FULL LOG.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 15:33:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sql-query-conversion-to-proc-sql/m-p/378201#M5452</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-21T15:33:06Z</dc:date>
    </item>
  </channel>
</rss>

