<?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 drop in a merge statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/760984#M240719</link>
    <description>&lt;PRE&gt;Combining Data-Sets

data related1;

input Cust1-Cust22 ID;

cards;

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10

run;

data related2;

input ID Cust1-Cust28;

cards;

1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

run;
data notrelatedmatch;
merge related1st(in=in1) related2st(in=in2);
length find $15;
by id;
if in1 and not in2 then find='not_matched1';
else if not in1 and in2 then find='not_matched2';

&lt;/PRE&gt;
&lt;P&gt;Hello team,&lt;/P&gt;
&lt;P&gt;How to&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;exclude all variables that begin with “Cu” from notrelatedmatch?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;blueblue&lt;/P&gt;</description>
    <pubDate>Fri, 20 Aug 2021 21:31:58 GMT</pubDate>
    <dc:creator>GN0001</dc:creator>
    <dc:date>2021-08-20T21:31:58Z</dc:date>
    <item>
      <title>drop in a merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/760984#M240719</link>
      <description>&lt;PRE&gt;Combining Data-Sets

data related1;

input Cust1-Cust22 ID;

cards;

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10

run;

data related2;

input ID Cust1-Cust28;

cards;

1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

run;
data notrelatedmatch;
merge related1st(in=in1) related2st(in=in2);
length find $15;
by id;
if in1 and not in2 then find='not_matched1';
else if not in1 and in2 then find='not_matched2';

&lt;/PRE&gt;
&lt;P&gt;Hello team,&lt;/P&gt;
&lt;P&gt;How to&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;exclude all variables that begin with “Cu” from notrelatedmatch?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;blueblue&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 21:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/760984#M240719</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-08-20T21:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: where clause in a merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/760985#M240720</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;How to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;exclude all variables that begin with “Cu” from notrelatedmatch?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;On the one hand, you ask about removing variables, but your title talks about WHERE clause which removes observations. So which is it? Do you want to remove variables or observations?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 18:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/760985#M240720</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-11T18:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: where clause in a merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/760990#M240722</link>
      <description>&lt;P&gt;Drop cu: ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want them why bother keeping them through the merge??? Use data set options to Keep=ID as that is the only other variable you show.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 19:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/760990#M240722</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-11T19:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: where clause in a merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/761012#M240734</link>
      <description>&lt;P&gt;Hello Diamond,&lt;/P&gt;
&lt;P&gt;I am talking about variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used drop statement:&lt;/P&gt;
&lt;PRE&gt;data notrelatedmatch(drop=cust:);&lt;/PRE&gt;
&lt;P&gt;I got what I wanted. I wonder if we can use a list variable in where clause with not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise me.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;blueblue&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 20:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/761012#M240734</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-08-11T20:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: where clause in a merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/761020#M240739</link>
      <description>&lt;P&gt;Yes, you can use a list of variables next to DROP=&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please go back to your ORIGINAL post in this thread and modify the title to indicate you want to remove variables in a MERGE, so that the title reflects the actual subject of the post.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 21:17:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/761020#M240739</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-11T21:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: where clause in a merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/761024#M240742</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello Diamond,&lt;/P&gt;
&lt;P&gt;I am talking about variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used drop statement:&lt;/P&gt;
&lt;PRE&gt;data notrelatedmatch(drop=cust:);&lt;/PRE&gt;
&lt;P&gt;I got what I wanted. I wonder if we can use a list variable in where clause with not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise me.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;blueblue&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You will have to show the exact where clause you intend to use. Hit or miss whether you guess right. Most value comparisons likely don' t us a list the way you expect, especially if want to compare multiple variables and multiple values.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 21:28:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/761024#M240742</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-11T21:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: where clause in a merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/762806#M241550</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help everyone by editing the title of the ORIGINAL post to indicate that the question is not about WHERE clauses but it is about DROP= lists.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 10:50:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/762806#M241550</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-20T10:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: where clause in a merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/762864#M241566</link>
      <description>Hello,&lt;BR /&gt;I did it in the original post.&lt;BR /&gt;Regards,&lt;BR /&gt;blueblue&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Aug 2021 15:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/762864#M241566</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-08-20T15:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: where clause in a merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/762880#M241571</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hello,&lt;BR /&gt;I did it in the original post.&lt;BR /&gt;Regards,&lt;BR /&gt;blueblue&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't think you did, it still says "WHERE clause ..."&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 16:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/762880#M241571</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-20T16:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: where clause in a merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/762987#M241615</link>
      <description>I did it on the original post. I have been very busy at work and I couldn't&lt;BR /&gt;make it to all of them. I think when we do on the original post, the other&lt;BR /&gt;titles should be updated as well.&lt;BR /&gt;&lt;BR /&gt;Thanks for all,&lt;BR /&gt;blueblue&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Aug 2021 21:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drop-in-a-merge-statement/m-p/762987#M241615</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-08-20T21:22:23Z</dc:date>
    </item>
  </channel>
</rss>

