<?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: How to do in proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416196#M280231</link>
    <description>CREATE TABLE SCORE AS&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM NEW4&lt;BR /&gt;LEFT JOIN&lt;BR /&gt;NEW1&lt;BR /&gt;ON NEW4.ID = NEW1.ID;QUIT;</description>
    <pubDate>Sun, 26 Nov 2017 14:44:53 GMT</pubDate>
    <dc:creator>ganandlife</dc:creator>
    <dc:date>2017-11-26T14:44:53Z</dc:date>
    <item>
      <title>How to do in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416189#M280228</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to do below codes in proc sql.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=new out=new1 nodupkey;
by id;
where roll=100;
run;

proc sort data new2 out =new4 nodupkey
by id;
where roll=100;
run;

data score;
merge new4 (in=a) new1;
by id;
if a;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Nov 2017 12:43:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416189#M280228</guid>
      <dc:creator>ganandlife</dc:creator>
      <dc:date>2017-11-26T12:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to do in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416191#M280229</link>
      <description>&lt;P&gt;We shouldn't be writing code for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give it a try in PROC SQL and if it doesn't work, show us the SASLOG and your code and I'm sure we can figure out what is wrong.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 14:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416191#M280229</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-11-26T14:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to do in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416195#M280230</link>
      <description>Sorry..I am not able to try because my sas is not working at home...</description>
      <pubDate>Sun, 26 Nov 2017 14:40:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416195#M280230</guid>
      <dc:creator>ganandlife</dc:creator>
      <dc:date>2017-11-26T14:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to do in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416196#M280231</link>
      <description>CREATE TABLE SCORE AS&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM NEW4&lt;BR /&gt;LEFT JOIN&lt;BR /&gt;NEW1&lt;BR /&gt;ON NEW4.ID = NEW1.ID;QUIT;</description>
      <pubDate>Sun, 26 Nov 2017 14:44:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416196#M280231</guid>
      <dc:creator>ganandlife</dc:creator>
      <dc:date>2017-11-26T14:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to do in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416197#M280232</link>
      <description>Not sure how to use those two nodupkey function in proc sql</description>
      <pubDate>Sun, 26 Nov 2017 14:48:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416197#M280232</guid>
      <dc:creator>ganandlife</dc:creator>
      <dc:date>2017-11-26T14:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to do in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416199#M280233</link>
      <description>&lt;P&gt;There is no such thing as the NODUPKEY option in PROC SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you really need that exact feature, the easiest thing is to to this in PROC SORT, where NODUPKEY exists.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 15:20:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416199#M280233</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-11-26T15:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to do in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416200#M280234</link>
      <description>how do we create dataset new 4 and new1 to get distinct records from new and new2, then do left join in proc sql...</description>
      <pubDate>Sun, 26 Nov 2017 15:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416200#M280234</guid>
      <dc:creator>ganandlife</dc:creator>
      <dc:date>2017-11-26T15:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to do in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416202#M280235</link>
      <description>&lt;P&gt;Nodupkey in a proc sort removes all duplicates regarding the key variable only, while select distinct in sql removes duplicates where&amp;nbsp;&lt;EM&gt;all&lt;/EM&gt; variables in the select are identical.&lt;/P&gt;
&lt;P&gt;So the contents of all other variables in your datasets will be critical.&lt;/P&gt;
&lt;P&gt;It's now time that you supply some example data (use datasteps with datalines) against which we can test code.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 15:52:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416202#M280235</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-26T15:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to do in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416208#M280236</link>
      <description>&lt;P&gt;It's time for you, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/179487"&gt;@ganandlife&lt;/a&gt;, to explain why you keep asking questions where you have code that works, and you seem to insist that you have to translate it into PROC SQL. Why? It seems like a waste of time to me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 20:02:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416208#M280236</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-11-26T20:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to do in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416248#M280237</link>
      <description>&lt;P&gt;You can get the equivalent of nodupkey sort with SAS/SQL, or at least something close. You just need to get SQL to drop extra rows at random.&amp;nbsp;For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.cars out=ncars nodupkey; 
by make; run;

proc sql;
create table ucars(drop=rnd) as
select *, rand("uniform") as rnd from sashelp.cars
group by make
having rnd=min(rnd)
order by make;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 04:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-in-proc-sql/m-p/416248#M280237</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-11-27T04:54:56Z</dc:date>
    </item>
  </channel>
</rss>

