<?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: sas base and proc sql code for following question plz help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-base-and-proc-sql-code-for-following-question-plz-help/m-p/407535#M99330</link>
    <description>&lt;P&gt;To do this with SQL is not efficient:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
select * 
from 
    (select unique name from have) 
    natural left join
    (select name, country from have where country is not missing)
    natural left join
    (select name, salary from have where salary is not missing);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 26 Oct 2017 04:29:38 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2017-10-26T04:29:38Z</dc:date>
    <item>
      <title>sas base and proc sql code for following question plz help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-base-and-proc-sql-code-for-following-question-plz-help/m-p/407425#M99285</link>
      <description>&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile datalines missover dsd;&lt;/P&gt;&lt;P&gt;input name $ country $ salary;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;ganesh,, 40000&lt;/P&gt;&lt;P&gt;ganesh,india,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output data set should be like as under&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;name country salary&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;ganesh india 40000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;thanks in advance&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 18:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-base-and-proc-sql-code-for-following-question-plz-help/m-p/407425#M99285</guid>
      <dc:creator>ganeshmule</dc:creator>
      <dc:date>2017-10-25T18:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: sas base and proc sql code for following question plz help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-base-and-proc-sql-code-for-following-question-plz-help/m-p/407441#M99290</link>
      <description>&lt;P&gt;UPDATE statement is what you want/need.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 19:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-base-and-proc-sql-code-for-following-question-plz-help/m-p/407441#M99290</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-25T19:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: sas base and proc sql code for following question plz help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-base-and-proc-sql-code-for-following-question-plz-help/m-p/407534#M99329</link>
      <description>&lt;P&gt;Use the self-update trick where every non-missing variable&amp;nbsp;overwrites the previous value within a by group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile datalines missover dsd;
input name $ country $ salary;
datalines;
ganesh,, 40000
ganesh,india,  
Smith,USA,
Smith,,100000 
;

proc sort data=have; by name; run;

data want;
update have(obs=0) have;
by name;
run;

proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2017 04:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-base-and-proc-sql-code-for-following-question-plz-help/m-p/407534#M99329</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-10-26T04:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: sas base and proc sql code for following question plz help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-base-and-proc-sql-code-for-following-question-plz-help/m-p/407535#M99330</link>
      <description>&lt;P&gt;To do this with SQL is not efficient:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
select * 
from 
    (select unique name from have) 
    natural left join
    (select name, country from have where country is not missing)
    natural left join
    (select name, salary from have where salary is not missing);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2017 04:29:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-base-and-proc-sql-code-for-following-question-plz-help/m-p/407535#M99330</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-10-26T04:29:38Z</dc:date>
    </item>
  </channel>
</rss>

