<?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/116117#M23948</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could it be done with exists and corr? Just curious, I'm not sure &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2013 22:06:12 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-02-20T22:06:12Z</dc:date>
    <item>
      <title>Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/116115#M23946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&amp;nbsp;&amp;nbsp; cust_xref_id,ssn,id_nbr,count(id_nbr) as card_count from card_master&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where cust_xref_id,ssn in (select cust_xref_id,ssn from card_master&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where id_nbr in (&amp;amp;id_nbr)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by cust_xref_id,ssn.id_nbr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user passes the id_nbr for which ssn and cust_xref_id are populated.The idea is to get the count of number of cards for that combination of cust_xref_id and ssn.&lt;BR /&gt;and then join the above table with table on id_nbr,populating the card_count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can a where clause like above be used?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 21:13:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/116115#M23946</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2013-02-20T21:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/116116#M23947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t1.cust_xref_id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t1.ssn,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t1.id_nbr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(t1.id_nbr) as card_count &lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; card_master t1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inner join (select distinct cust_xref_id, ssn from card_master where id_nbr in (&amp;amp;id_nbr)) t2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on t1.cust_xref_id=t2.cust_xref_id and t1.ssn=t2.ssn&lt;/P&gt;&lt;P&gt;group by&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t1.cust_xref_id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t1.ssn.id_nbr&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 22:00:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/116116#M23947</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2013-02-20T22:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/116117#M23948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could it be done with exists and corr? Just curious, I'm not sure &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 22:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/116117#M23948</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-20T22:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/116118#M23949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data try;&lt;BR /&gt;input cust_xref_id ssn id_nbr;&lt;BR /&gt;cards;&lt;BR /&gt;1234 1111 123456&lt;BR /&gt;1234 1111 234567&lt;BR /&gt;1234 1111 345678&lt;BR /&gt;1234 1111 456789&lt;BR /&gt;2345 2222 891023&lt;BR /&gt;2345 2222 910234&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;the idea is: when the user passes the value 345678 for id_nbr,the cust_xfer_id abd ssn are 1234 and 1111.&lt;BR /&gt;&amp;nbsp; for this combination there are four cards.(123456,234567,345678,456789)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 22:12:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/116118#M23949</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2013-02-20T22:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/116119#M23950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using SAS, I have to connect to a database to get the results.I'm not sure if Corr works or not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 22:13:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql/m-p/116119#M23950</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2013-02-20T22:13:09Z</dc:date>
    </item>
  </channel>
</rss>

