<?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 How to delete one table (which is a subset of the other table) from the other table in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-delete-one-table-which-is-a-subset-of-the-other-table/m-p/116688#M32176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Can someone help me with this one? If &lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;i have two set of data and one (the subset) is contained in the other (the bigger set). How can I delete all the observations which are in the smaller table from the bigger table, using the smaller table? For example:&lt;BR /&gt; Set 1&amp;nbsp; (big set)&lt;BR /&gt; X Y&lt;BR /&gt; 1 2&lt;BR /&gt; 3 4 &lt;BR /&gt; 5 6 &lt;BR /&gt; 7 8&lt;BR /&gt; 9 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;Set 2 (subset)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;X Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;1 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;5 6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;7 8&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;I want to have as the result:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;X Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;3 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;9 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;Thank you very much!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 04 Nov 2012 11:08:56 GMT</pubDate>
    <dc:creator>thdang</dc:creator>
    <dc:date>2012-11-04T11:08:56Z</dc:date>
    <item>
      <title>How to delete one table (which is a subset of the other table) from the other table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-delete-one-table-which-is-a-subset-of-the-other-table/m-p/116688#M32176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Can someone help me with this one? If &lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;i have two set of data and one (the subset) is contained in the other (the bigger set). How can I delete all the observations which are in the smaller table from the bigger table, using the smaller table? For example:&lt;BR /&gt; Set 1&amp;nbsp; (big set)&lt;BR /&gt; X Y&lt;BR /&gt; 1 2&lt;BR /&gt; 3 4 &lt;BR /&gt; 5 6 &lt;BR /&gt; 7 8&lt;BR /&gt; 9 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;Set 2 (subset)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;X Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;1 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;5 6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;7 8&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;I want to have as the result:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;X Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;3 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;9 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;Thank you very much!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Nov 2012 11:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-delete-one-table-which-is-a-subset-of-the-other-table/m-p/116688#M32176</guid>
      <dc:creator>thdang</dc:creator>
      <dc:date>2012-11-04T11:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete one table (which is a subset of the other table) from the other table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-delete-one-table-which-is-a-subset-of-the-other-table/m-p/116689#M32177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way to go:&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; delete from Set_1&lt;/P&gt;&lt;P&gt;&amp;nbsp; where exists (select * from set_2 where set_1.x=set_2.x and set_1.y=set_2.Y)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Nov 2012 13:33:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-delete-one-table-which-is-a-subset-of-the-other-table/m-p/116689#M32177</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-11-04T13:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete one table (which is a subset of the other table) from the other table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-delete-one-table-which-is-a-subset-of-the-other-table/m-p/116690#M32178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SQL except operator provides the most straightforward approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data big;&lt;/P&gt;&lt;P&gt;input x y;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 2&lt;/P&gt;&lt;P&gt;3 4&lt;/P&gt;&lt;P&gt;5 6&lt;/P&gt;&lt;P&gt;7 8&lt;/P&gt;&lt;P&gt;9 10&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data subset;&lt;/P&gt;&lt;P&gt;input X Y;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 2&lt;/P&gt;&lt;P&gt;5 6&lt;/P&gt;&lt;P&gt;7 8&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt; create table want as&lt;/P&gt;&lt;P&gt; select * from big&lt;/P&gt;&lt;P&gt; except&lt;/P&gt;&lt;P&gt; select * from subset;&lt;/P&gt;&lt;P&gt; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Nov 2012 13:35:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-delete-one-table-which-is-a-subset-of-the-other-table/m-p/116690#M32178</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-11-04T13:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete one table (which is a subset of the other table) from the other table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-delete-one-table-which-is-a-subset-of-the-other-table/m-p/116691#M32179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Nov 2012 15:10:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-delete-one-table-which-is-a-subset-of-the-other-table/m-p/116691#M32179</guid>
      <dc:creator>thdang</dc:creator>
      <dc:date>2012-11-04T15:10:57Z</dc:date>
    </item>
  </channel>
</rss>

