<?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 help using except operator in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/help-using-except-operator/m-p/60900#M17267</link>
    <description>Hi All,&lt;BR /&gt;
I will be very grateful, if any one can help me.&lt;BR /&gt;
i am trying to output dataset test: variables that are in  table A not in table B&lt;BR /&gt;
here 2 situations &lt;BR /&gt;
1. all variable ids are same in table A and table B&lt;BR /&gt;
2. all variable ids in table A are not equal to table  B ( i know we can perform the filtering only on the same variable ids)&lt;BR /&gt;
here is my code&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table test1 as select * from  TABLE A as t1&lt;BR /&gt;
except&lt;BR /&gt;
select * from table B as t2,&lt;BR /&gt;
on  t1.lastname=t2.lastname and  t1.dob=t2.dob;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
I am unable to find where am going wrong</description>
    <pubDate>Mon, 22 Feb 2010 13:26:04 GMT</pubDate>
    <dc:creator>ssas</dc:creator>
    <dc:date>2010-02-22T13:26:04Z</dc:date>
    <item>
      <title>help using except operator</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-using-except-operator/m-p/60900#M17267</link>
      <description>Hi All,&lt;BR /&gt;
I will be very grateful, if any one can help me.&lt;BR /&gt;
i am trying to output dataset test: variables that are in  table A not in table B&lt;BR /&gt;
here 2 situations &lt;BR /&gt;
1. all variable ids are same in table A and table B&lt;BR /&gt;
2. all variable ids in table A are not equal to table  B ( i know we can perform the filtering only on the same variable ids)&lt;BR /&gt;
here is my code&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table test1 as select * from  TABLE A as t1&lt;BR /&gt;
except&lt;BR /&gt;
select * from table B as t2,&lt;BR /&gt;
on  t1.lastname=t2.lastname and  t1.dob=t2.dob;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
I am unable to find where am going wrong</description>
      <pubDate>Mon, 22 Feb 2010 13:26:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-using-except-operator/m-p/60900#M17267</guid>
      <dc:creator>ssas</dc:creator>
      <dc:date>2010-02-22T13:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: help using except operator</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-using-except-operator/m-p/60901#M17268</link>
      <description>maybe you have columns in different orders. maybe something else.&lt;BR /&gt;
Reading the manual on line helps select the relevant section "set operators", just by searching from this page for "sql except operator" in "product documentation".&lt;BR /&gt;
I found "corresponding". It also shows that you don't use the "ON " syntax of a join.&lt;BR /&gt;
Have a look at the examples yourself.&lt;BR /&gt;
And next time, please post the ERROR: messages.&lt;BR /&gt;
 &lt;BR /&gt;
good luck&lt;BR /&gt;
PeterC</description>
      <pubDate>Sun, 28 Feb 2010 10:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-using-except-operator/m-p/60901#M17268</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-02-28T10:06:39Z</dc:date>
    </item>
  </channel>
</rss>

