<?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 sql into sas data step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-sql-into-sas-data-step/m-p/496006#M131054</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=tablea;
by b;
run;

proc sort data=tablea;
by b;
run;


data tablec;
merge tablea(in=ina) tableb(in=inb);
by b;
if ina;
if not (substr(d,1,1)='1' and length(trim(d))=11);
dc=(substr(d,1,1);
run;

proc sort data=tablec;
by dc;
run;

data tablec(where=(dc &amp;lt;=1));
do until(last.dc);
set tablec;
by dc;
retain count;
if first.dc then count=1;
else count+1;
end;
do until(last.dc);
set tablec;
by dc;
output;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;N.B. Untested code.&lt;/P&gt;</description>
    <pubDate>Sun, 16 Sep 2018 05:27:51 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2018-09-16T05:27:51Z</dc:date>
    <item>
      <title>SAS sql into sas data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-sql-into-sas-data-step/m-p/496005#M131053</link>
      <description>&lt;P&gt;SAS sql into sas data step&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
create table tableC as
slect A.a,A.b,A.c,B.d,B.e
from tableA A
inner join tableB B
on A.b=B.b;

delete from tableC
where not (substr(d,1,1)='1' and length(trim(d))=11)
or d is null;

delete from tableC
where d in
(select d from tableC group by d having count(1)&amp;gt;1);
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;thank you for your time!&lt;/P&gt;</description>
      <pubDate>Sun, 16 Sep 2018 04:15:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-sql-into-sas-data-step/m-p/496005#M131053</guid>
      <dc:creator>Geo-</dc:creator>
      <dc:date>2018-09-16T04:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS sql into sas data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-sql-into-sas-data-step/m-p/496006#M131054</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=tablea;
by b;
run;

proc sort data=tablea;
by b;
run;


data tablec;
merge tablea(in=ina) tableb(in=inb);
by b;
if ina;
if not (substr(d,1,1)='1' and length(trim(d))=11);
dc=(substr(d,1,1);
run;

proc sort data=tablec;
by dc;
run;

data tablec(where=(dc &amp;lt;=1));
do until(last.dc);
set tablec;
by dc;
retain count;
if first.dc then count=1;
else count+1;
end;
do until(last.dc);
set tablec;
by dc;
output;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;N.B. Untested code.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Sep 2018 05:27:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-sql-into-sas-data-step/m-p/496006#M131054</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2018-09-16T05:27:51Z</dc:date>
    </item>
  </channel>
</rss>

