<?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 query in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/276071#M58618</link>
    <description>&lt;P&gt;This may give what your are looking for if I understand the problem:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table want as
   select table1.id, table1.term,table1.date, table2.term1
   from table1 left join table2 
      on table1.id=table2.id
   where table1.term ne table2.term1;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 08 Jun 2016 19:09:38 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-06-08T19:09:38Z</dc:date>
    <item>
      <title>SAS Query - Where data not present in one dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/275983#M58603</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can some one help me with below query. I have 1st dataset with three variables.&lt;/P&gt;
&lt;P&gt;Id, date, term&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have second dataset with below three variables.&lt;/P&gt;
&lt;P&gt;Term1,date1,id&lt;/P&gt;
&lt;P&gt;For both the dataset ID is the primary key variable. I would like to write a query to output when TERM is not equal to TERM1. Term and Term1 will not be same sorting order for one to one match.&lt;/P&gt;
&lt;P&gt;The output should look like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;12004002 TRAMADOL UN/AUG/2014&lt;/P&gt;
&lt;P&gt;12004002 MICONAZOL 18/JAN/2016&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Rakesh&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 18:14:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/275983#M58603</guid>
      <dc:creator>rakeshvvv</dc:creator>
      <dc:date>2016-06-08T18:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: sas query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/275990#M58604</link>
      <description>&lt;P&gt;Which variables are in the output? Term, Term1, Date or date1 (assuming that ID is one of the output variables).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 15:05:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/275990#M58604</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-08T15:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: sas query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/275993#M58605</link>
      <description>I'm confused. If ID is the PK then there should be no sort order for term..?</description>
      <pubDate>Wed, 08 Jun 2016 15:06:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/275993#M58605</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-06-08T15:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: sas query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/275998#M58607</link>
      <description>the variables present in the output should be id,term,term1,date&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Wed, 08 Jun 2016 15:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/275998#M58607</guid>
      <dc:creator>rakeshvvv</dc:creator>
      <dc:date>2016-06-08T15:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: sas query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/276051#M58617</link>
      <description>&lt;P&gt;What about dates? Do those have to match or be within a window of each other?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 18:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/276051#M58617</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-08T18:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: sas query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/276071#M58618</link>
      <description>&lt;P&gt;This may give what your are looking for if I understand the problem:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table want as
   select table1.id, table1.term,table1.date, table2.term1
   from table1 left join table2 
      on table1.id=table2.id
   where table1.term ne table2.term1;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Jun 2016 19:09:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Query-Where-data-not-present-in-one-dataset/m-p/276071#M58618</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-08T19:09:38Z</dc:date>
    </item>
  </channel>
</rss>

