<?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: matching data and non matching data by sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/482080#M124809</link>
    <description>&lt;P&gt;May I suggest the following approach which is simpler to implement for any number of datasets:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Mh;
Input Subjid $ Visit $ Dose $;
Cards;
U001 Week1 Asp-05mg
U002 Week1 Asp-10mg
U003 Week1 Asp-15mg
U001 Week2 Asp-05mg
U002 Week2 Asp-10mg
U003 Week2 Placebo
U001 Week3 Asp-05mg
U002 Week3 Placebo
U003 Week3 Asp-15mg
U004 Week1 Asp-05mg
;

Data Ae;
Input Subjid $ Visit $ Aeterm $;
Cards;
U001 Week1 Headac
U002 Week1 Rashs
U003 Week1 Fever
U001 Week2 Vomiting
U002 Week2 Skinprb
U003 Week2 Rashs
U001 Week3 Headac
U002 Week3 cold
U003 Week3 Fever
U004 Week2 Dizzy
;

data lb ;
input subjid $ visit $ test $ ;
cards ;
U001 Week1 RBC
U002 Week1 WBC
U003 Week1 PLASMA
U001 Week2 ELISA
U002 Week2 WBC
U003 Week2 RBC
U004 Week3 ABC
;

proc sql;
create table matching as
select 
    coalesce(mh.subjid, ae.subjid, lb.subjid) as subjid,
    coalesce(mh.visit, ae.visit, lb.visit) as visit,
    mh.dose, Ae.Aeterm, lb.test,
    cmiss(mh.dose, ae.aeterm, lb.test) as missMatch
from 
    mh full join 
    ae on Mh.subjid=Ae.subjid and Mh.visit=Ae.visit full join
    lb on Mh.subjid=lb.subjid and Mh.visit=lb.visit
order by missMatch, subjid, visit;
select * from matching;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;                  subjid    visit     Dose      Aeterm    test      missMatch
                  -----------------------------------------------------------
                  U001      Week1     Asp-05mg  Headac    RBC               0
                  U001      Week2     Asp-05mg  Vomiting  ELISA             0
                  U002      Week1     Asp-10mg  Rashs     WBC               0
                  U002      Week2     Asp-10mg  Skinprb   WBC               0
                  U003      Week1     Asp-15mg  Fever     PLASMA            0
                  U003      Week2     Placebo   Rashs     RBC               0
                  U001      Week3     Asp-05mg  Headac                      1
                  U002      Week3     Placebo   cold                        1
                  U003      Week3     Asp-15mg  Fever                       1
                  U004      Week1     Asp-05mg                              2
                  U004      Week2               Dizzy                       2
                  U004      Week3                         ABC               2
&lt;/PRE&gt;</description>
    <pubDate>Fri, 27 Jul 2018 21:56:35 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2018-07-27T21:56:35Z</dc:date>
    <item>
      <title>matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481752#M124682</link>
      <description>&lt;P&gt;Data Mh;&lt;BR /&gt;Input Subjid $ Visit $ Dose $;&lt;BR /&gt;Cards;&lt;BR /&gt;U001 Week1 Asp-05mg&lt;BR /&gt;U002 Week1 Asp-10mg&lt;BR /&gt;U003 Week1 Asp-15mg&lt;BR /&gt;U001 Week2 Asp-05mg&lt;BR /&gt;U002 Week2 Asp-10mg&lt;BR /&gt;U003 Week2 Placebo&lt;BR /&gt;U001 Week3 Asp-05mg&lt;BR /&gt;U002 Week3 Placebo&lt;BR /&gt;U003 Week3 Asp-15mg&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Data Ae;&lt;BR /&gt;Input Subjid $ Visit $ Aeterm $;&lt;BR /&gt;Cards;&lt;BR /&gt;U001 Week1 Headac&lt;BR /&gt;U002 Week1 Rashs&lt;BR /&gt;U003 Week1 Fever&lt;BR /&gt;U001 Week2 Vomiting&lt;BR /&gt;U002 Week2 Skinprb&lt;BR /&gt;U003 Week2 Rashs&lt;BR /&gt;U001 Week3 Headac&lt;BR /&gt;U002 Week3 cold&lt;BR /&gt;U003 Week3 Fever&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;by using above data to form the matching data and non matching two separate datasets by using sql&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 03:55:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481752#M124682</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-07-27T03:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481754#M124684</link>
      <description>&lt;P&gt;You might be able to use fewer words if you really tried, but it would be hard... &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please give more information. For example the expected output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 04:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481754#M124684</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-27T04:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481755#M124685</link>
      <description>U001 Week3 Asp-05mg&lt;BR /&gt;U002 Week3 Placebo&lt;BR /&gt;U003 Week3 Asp-15mg&lt;BR /&gt;u003 week4 asprin&lt;BR /&gt;u004 week1 drug&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;Data Ae;&lt;BR /&gt;Input Subjid $ Visit $ Aeterm $;&lt;BR /&gt;Cards;&lt;BR /&gt;U001 Week1 Headac&lt;BR /&gt;U002 Week1 Rashs&lt;BR /&gt;U003 Week1 Fever&lt;BR /&gt;U001 Week2 Vomiting&lt;BR /&gt;U002 Week2 Skinprb&lt;BR /&gt;U003 Week2 Rashs&lt;BR /&gt;U001 Week3 Headac&lt;BR /&gt;U003 week6 pain&lt;BR /&gt;u005 week1 fever&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;some record not matched by subjid and visit wise so i want matching data&lt;BR /&gt;and non matching data by using sql</description>
      <pubDate>Fri, 27 Jul 2018 04:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481755#M124685</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-07-27T04:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481757#M124686</link>
      <description>&lt;P&gt;I would do something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
create table matching as
select Mh.*, Ae.Aeterm
from Mh inner join Ae
    on Mh.subjid=Ae.subjid and Mh.visit=Ae.visit;
create table nonMatching as
select subjid, visit, catx(" - ", "Dose", dose) as value
from Mh
where not exists (select * from Ae where Mh.subjid=Ae.subjid and Mh.visit=Ae.visit)
union all
select subjid, visit, catx(" - ", "Aeterm", Aeterm) as value
from Ae
where not exists (select * from Mh where Mh.subjid=Ae.subjid and Mh.visit=Ae.visit);
quit;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 04:30:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481757#M124686</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-07-27T04:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481759#M124687</link>
      <description>data lb ;&lt;BR /&gt;input subjid $ visit $ test $ ;&lt;BR /&gt;cards ;&lt;BR /&gt;u101 week1 rbc&lt;BR /&gt;u101 week2 wbc&lt;BR /&gt;u102 week1 rbc&lt;BR /&gt;u103 week2 plasma&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if we add this data also how will we do matching data and non matching data.&lt;BR /&gt;because it is easy for me to solve the two datasets but somewhat hard for&lt;BR /&gt;me if any other dataset added</description>
      <pubDate>Fri, 27 Jul 2018 04:36:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481759#M124687</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-07-27T04:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481763#M124688</link>
      <description>&lt;P&gt;Please state the problem clearly, to its full extent.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 04:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481763#M124688</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-07-27T04:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481764#M124689</link>
      <description>Data Mh;&lt;BR /&gt;&lt;BR /&gt;Input Subjid $ Visit $ Dose $;&lt;BR /&gt;&lt;BR /&gt;Cards;&lt;BR /&gt;&lt;BR /&gt;U001 Week1 Asp-05mg&lt;BR /&gt;&lt;BR /&gt;U002 Week1 Asp-10mg&lt;BR /&gt;&lt;BR /&gt;U003 Week1 Asp-15mg&lt;BR /&gt;&lt;BR /&gt;U001 Week2 Asp-05mg&lt;BR /&gt;&lt;BR /&gt;U002 Week2 Asp-10mg&lt;BR /&gt;&lt;BR /&gt;U003 Week2 Placebo&lt;BR /&gt;&lt;BR /&gt;U001 Week3 Asp-05mg&lt;BR /&gt;&lt;BR /&gt;U002 Week3 Placebo&lt;BR /&gt;&lt;BR /&gt;U003 Week3 Asp-15mg&lt;BR /&gt;&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Data Ae;&lt;BR /&gt;&lt;BR /&gt;Input Subjid $ Visit $ Aeterm $;&lt;BR /&gt;&lt;BR /&gt;Cards;&lt;BR /&gt;&lt;BR /&gt;U001 Week1 Headac&lt;BR /&gt;&lt;BR /&gt;U002 Week1 Rashs&lt;BR /&gt;&lt;BR /&gt;U003 Week1 Fever&lt;BR /&gt;&lt;BR /&gt;U001 Week2 Vomiting&lt;BR /&gt;&lt;BR /&gt;U002 Week2 Skinprb&lt;BR /&gt;&lt;BR /&gt;U003 Week2 Rashs&lt;BR /&gt;&lt;BR /&gt;U001 Week3 Headac&lt;BR /&gt;&lt;BR /&gt;U002 Week3 cold&lt;BR /&gt;&lt;BR /&gt;U003 Week3 Fever&lt;BR /&gt;&lt;BR /&gt;;&lt;BR /&gt;data lb ;&lt;BR /&gt;input subjid $ visit $ test $ ;&lt;BR /&gt;cards ;&lt;BR /&gt;&lt;BR /&gt;U001 Week1 RBC&lt;BR /&gt;&lt;BR /&gt;U002 Week1 WBC&lt;BR /&gt;&lt;BR /&gt;U003 Week1 PLASMA&lt;BR /&gt;&lt;BR /&gt;U001 Week2 ELISA&lt;BR /&gt;&lt;BR /&gt;U002 Week2 WBC&lt;BR /&gt;&lt;BR /&gt;U003 Week2 RBC&lt;BR /&gt;&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;How to get matching and non matching data by using sql</description>
      <pubDate>Fri, 27 Jul 2018 04:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481764#M124689</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-07-27T04:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481770#M124693</link>
      <description>&lt;P&gt;What was wrong with the code &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt; posted? From text and dataset-names it is hardly possible to understand what you have and what you expect as result.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 05:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481770#M124693</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-07-27T05:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481772#M124695</link>
      <description>code is good in this we used only two data sets but i gave one more dataset&lt;BR /&gt;total three datasets how to solve matching and non matching data</description>
      <pubDate>Fri, 27 Jul 2018 05:32:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481772#M124695</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-07-27T05:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481959#M124758</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/209685"&gt;@thanikondharish&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;code is good in this we used only two data sets but i gave one more dataset&lt;BR /&gt;total three datasets how to solve matching and non matching data&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;WHICH match? With 3 data sets you have possibilities of&lt;/P&gt;
&lt;P&gt;Match in 1 and 2&lt;/P&gt;
&lt;P&gt;Match in 1 and 3&lt;/P&gt;
&lt;P&gt;Match in 2 and 3&lt;/P&gt;
&lt;P&gt;Match in all of 1, 2, and 3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And some similar combinations&amp;nbsp;for not matching.&lt;/P&gt;
&lt;P&gt;So, what is the actual rule for "matching" in more than one data set? Note that if you go to 4 the number of possibilities goes up.&lt;/P&gt;
&lt;P&gt;The phrase "2 to the nth power" is involved here.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 18:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481959#M124758</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-27T18:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481972#M124765</link>
      <description>Match in all of 1,2and3</description>
      <pubDate>Fri, 27 Jul 2018 18:15:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/481972#M124765</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-07-27T18:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/482080#M124809</link>
      <description>&lt;P&gt;May I suggest the following approach which is simpler to implement for any number of datasets:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Mh;
Input Subjid $ Visit $ Dose $;
Cards;
U001 Week1 Asp-05mg
U002 Week1 Asp-10mg
U003 Week1 Asp-15mg
U001 Week2 Asp-05mg
U002 Week2 Asp-10mg
U003 Week2 Placebo
U001 Week3 Asp-05mg
U002 Week3 Placebo
U003 Week3 Asp-15mg
U004 Week1 Asp-05mg
;

Data Ae;
Input Subjid $ Visit $ Aeterm $;
Cards;
U001 Week1 Headac
U002 Week1 Rashs
U003 Week1 Fever
U001 Week2 Vomiting
U002 Week2 Skinprb
U003 Week2 Rashs
U001 Week3 Headac
U002 Week3 cold
U003 Week3 Fever
U004 Week2 Dizzy
;

data lb ;
input subjid $ visit $ test $ ;
cards ;
U001 Week1 RBC
U002 Week1 WBC
U003 Week1 PLASMA
U001 Week2 ELISA
U002 Week2 WBC
U003 Week2 RBC
U004 Week3 ABC
;

proc sql;
create table matching as
select 
    coalesce(mh.subjid, ae.subjid, lb.subjid) as subjid,
    coalesce(mh.visit, ae.visit, lb.visit) as visit,
    mh.dose, Ae.Aeterm, lb.test,
    cmiss(mh.dose, ae.aeterm, lb.test) as missMatch
from 
    mh full join 
    ae on Mh.subjid=Ae.subjid and Mh.visit=Ae.visit full join
    lb on Mh.subjid=lb.subjid and Mh.visit=lb.visit
order by missMatch, subjid, visit;
select * from matching;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;                  subjid    visit     Dose      Aeterm    test      missMatch
                  -----------------------------------------------------------
                  U001      Week1     Asp-05mg  Headac    RBC               0
                  U001      Week2     Asp-05mg  Vomiting  ELISA             0
                  U002      Week1     Asp-10mg  Rashs     WBC               0
                  U002      Week2     Asp-10mg  Skinprb   WBC               0
                  U003      Week1     Asp-15mg  Fever     PLASMA            0
                  U003      Week2     Placebo   Rashs     RBC               0
                  U001      Week3     Asp-05mg  Headac                      1
                  U002      Week3     Placebo   cold                        1
                  U003      Week3     Asp-15mg  Fever                       1
                  U004      Week1     Asp-05mg                              2
                  U004      Week2               Dizzy                       2
                  U004      Week3                         ABC               2
&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 21:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/482080#M124809</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-07-27T21:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/482142#M124826</link>
      <description>Data Mh;&lt;BR /&gt;Input Subjid $ Visit $ Dose $;&lt;BR /&gt;Cards;&lt;BR /&gt;U001 Week1 Asp-05mg&lt;BR /&gt;U002 Week1 Asp-10mg&lt;BR /&gt;U003 Week1 Asp-15mg&lt;BR /&gt;U001 Week2 Asp-05mg&lt;BR /&gt;U002 Week2 Asp-10mg&lt;BR /&gt;U003 Week2 Placebo&lt;BR /&gt;U001 Week3 Asp-05mg&lt;BR /&gt;U002 Week3 Placebo&lt;BR /&gt;U003 Week3 Asp-15mg&lt;BR /&gt;U004 Week1 Asp-05mg&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;Data Ae;&lt;BR /&gt;Input Subjid $ Visit $ Aeterm $;&lt;BR /&gt;Cards;&lt;BR /&gt;U001 Week1 Headac&lt;BR /&gt;U002 Week1 Rashs&lt;BR /&gt;U003 Week1 Fever&lt;BR /&gt;U001 Week2 Vomiting&lt;BR /&gt;U002 Week2 Skinprb&lt;BR /&gt;U003 Week2 Rashs&lt;BR /&gt;U001 Week3 Headac&lt;BR /&gt;U002 Week3 cold&lt;BR /&gt;U003 Week3 Fever&lt;BR /&gt;U004 Week2 Dizzy&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;data lb ;&lt;BR /&gt;input subjid $ visit $ test $ ;&lt;BR /&gt;cards ;&lt;BR /&gt;U001 Week1 RBC&lt;BR /&gt;U002 Week1 WBC&lt;BR /&gt;U003 Week1 PLASMA&lt;BR /&gt;U001 Week2 ELISA&lt;BR /&gt;U002 Week2 WBC&lt;BR /&gt;U003 Week2 RBC&lt;BR /&gt;U004 Week3 ABC&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data unmatching ;&lt;BR /&gt;&lt;BR /&gt;merge mh(in=a) ae(in=b) lb(in=c) ;&lt;BR /&gt;&lt;BR /&gt;by subjid visit ;&lt;BR /&gt;&lt;BR /&gt;if a=0 or b=0 or c=0 ;&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;what data shall i get if i submit above data at the same time i want&lt;BR /&gt;that data if we will use sql</description>
      <pubDate>Sat, 28 Jul 2018 03:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/482142#M124826</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-07-28T03:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/482151#M124830</link>
      <description>&lt;P&gt;Those would be the rows with missMatch &amp;gt; 0 in the matching dataset above. The missMatch number is the number of datasets where the subjid-visit is missing.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 04:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/482151#M124830</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-07-28T04:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: matching data and non matching data by sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/482153#M124832</link>
      <description>&lt;P&gt;1. Can you please use punctuation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. &lt;EM&gt;What data shall i get if &lt;/EM&gt;&lt;FONT face="courier new,courier"&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;if a=0 or b=0 or c=0 ;&lt;/FONT&gt; &lt;BR /&gt;This tells SAS to only keep teh data when one or more table(s) does not have the merge keys.&lt;BR /&gt;You could use:&lt;FONT face="courier new,courier"&gt; if A+B+C ne 3;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 05:23:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/matching-data-and-non-matching-data-by-sql/m-p/482153#M124832</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-28T05:23:17Z</dc:date>
    </item>
  </channel>
</rss>

