<?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 update a table with the another subselect. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/update-a-table-with-the-another-subselect/m-p/502942#M134317</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a table with ~200k rows and i have to update it from another table which has the same columns, but some columns has different values in it .How can i update the first table with the second? I have 2 ID -s in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 23:34:08 GMT</pubDate>
    <dc:creator>ger15xxhcker</dc:creator>
    <dc:date>2018-10-09T23:34:08Z</dc:date>
    <item>
      <title>update a table with the another subselect.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-table-with-the-another-subselect/m-p/502942#M134317</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a table with ~200k rows and i have to update it from another table which has the same columns, but some columns has different values in it .How can i update the first table with the second? I have 2 ID -s in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 23:34:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-table-with-the-another-subselect/m-p/502942#M134317</guid>
      <dc:creator>ger15xxhcker</dc:creator>
      <dc:date>2018-10-09T23:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: update a table with the another subselect.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-table-with-the-another-subselect/m-p/502943#M134318</link>
      <description>&lt;P&gt;Please show a sample of the two datasets before and the single dataset after.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 23:46:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-table-with-the-another-subselect/m-p/502943#M134318</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2018-10-09T23:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: update a table with the another subselect.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-table-with-the-another-subselect/m-p/502946#M134321</link>
      <description>&lt;P&gt;&lt;STRONG&gt;base table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;id1&amp;nbsp; &amp;nbsp; id2&amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp; &amp;nbsp; &amp;nbsp;b&amp;nbsp; &amp;nbsp; c&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp;10&amp;nbsp; &amp;nbsp;x1&amp;nbsp; &amp;nbsp;x2&amp;nbsp; &amp;nbsp;x3&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp;20&amp;nbsp; &amp;nbsp;y1&amp;nbsp; &amp;nbsp;y2&amp;nbsp; &amp;nbsp;y3&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp;30&amp;nbsp; &amp;nbsp;z1&amp;nbsp; &amp;nbsp;z2&amp;nbsp; &amp;nbsp;z3&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp;40&amp;nbsp; &amp;nbsp;r1&amp;nbsp; &amp;nbsp; r2&amp;nbsp; &amp;nbsp;r3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;i got this table from a source&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;id1&amp;nbsp; &amp;nbsp; id2&amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp; &amp;nbsp; &amp;nbsp;b&amp;nbsp; &amp;nbsp; c&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp;10&amp;nbsp; &amp;nbsp;x1&amp;nbsp; &amp;nbsp;x2&amp;nbsp; &amp;nbsp;x3&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp;20&amp;nbsp; &amp;nbsp;y1&amp;nbsp; &amp;nbsp;y2&amp;nbsp; &amp;nbsp;y3&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp;30&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;z4&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;z5&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;z3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i have to update the base table with the second one like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;final:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;id1&amp;nbsp; &amp;nbsp; id2&amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp; &amp;nbsp; &amp;nbsp;b&amp;nbsp; &amp;nbsp; c&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp;10&amp;nbsp; &amp;nbsp;x1&amp;nbsp; &amp;nbsp;x2&amp;nbsp; &amp;nbsp;x3&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp;20&amp;nbsp; &amp;nbsp;y1&amp;nbsp; &amp;nbsp;y2&amp;nbsp; &amp;nbsp;y3&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp;30&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;z4&amp;nbsp; &amp;nbsp;z5&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;z3&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp;40&amp;nbsp; &amp;nbsp;r1&amp;nbsp; &amp;nbsp; r2&amp;nbsp; &amp;nbsp; r3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 23:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-table-with-the-another-subselect/m-p/502946#M134321</guid>
      <dc:creator>ger15xxhcker</dc:creator>
      <dc:date>2018-10-09T23:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: update a table with the another subselect.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-table-with-the-another-subselect/m-p/502963#M134332</link>
      <description>&lt;P&gt;Use the update statement. That's exactly what it does.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input id1    id2     a $     b $    c $;
datalines;
   1     10   x1   x2   x3
   2     20   y1   y2   y3 
   3     30   z1   z2   z3
   4     40   r1   r2   r3
;
 
data b;
input id1    id2     a $     b $    c $;
datalines;
   1     10   x1   x2   x3
   2     20   y1   y2   y3 
   3     30   z4   z5   z3
;

data c;
update a b;
by id1 id2;
run;

proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Oct 2018 03:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-table-with-the-another-subselect/m-p/502963#M134332</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-10-10T03:13:12Z</dc:date>
    </item>
  </channel>
</rss>

