<?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: Update in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530112#M5658</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16600"&gt;@SASPhile&lt;/a&gt; please post a better sample dataset that represents your needs.&amp;nbsp; You are piece mealing your request.&amp;nbsp; Don't play the manager role in requesting results please.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jan 2019 16:27:54 GMT</pubDate>
    <dc:creator>VDD</dc:creator>
    <dc:date>2019-01-25T16:27:54Z</dc:date>
    <item>
      <title>Update</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530107#M5655</link>
      <description>&lt;P&gt;update :&lt;/P&gt;&lt;P&gt;TableA&lt;BR /&gt;Id Value&lt;BR /&gt;1 abc&lt;BR /&gt;2 pqr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TableB&lt;BR /&gt;Id Value&lt;BR /&gt;1&lt;BR /&gt;2 pqr&lt;/P&gt;&lt;P&gt;how to update tableb for an id if value is missing, update with valur from tableA?&lt;/P&gt;&lt;P&gt;Final output:&lt;/P&gt;&lt;P&gt;TableB&lt;BR /&gt;Id Value&lt;BR /&gt;1 abc&lt;BR /&gt;2 pqr&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 16:09:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530107#M5655</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2019-01-25T16:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Update</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530110#M5656</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input id value $;
cards;
1 abc
2 pqr
;
data b;
input id value $;
cards;
1 .
2 pqr
;
data b;
  modify b a;
  by id;
  if _IORC_=0 then replace;
  else _ERROR_=0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Jan 2019 16:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530110#M5656</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-25T16:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Update</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530111#M5657</link>
      <description>&lt;P&gt;if there are multiple columns and only one column is to be updated, like below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont want score to be replaced. only value ,the below logic doesnt work,right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a;&lt;BR /&gt;input id value $ score;&lt;BR /&gt;cards;&lt;BR /&gt;1 abc 350&lt;BR /&gt;2 pqr 275&lt;BR /&gt;;&lt;BR /&gt;data b;&lt;BR /&gt;input id value $3-6 score ;&lt;BR /&gt;cards;&lt;BR /&gt;1 371&lt;BR /&gt;2 pqr 372&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;data b;&lt;BR /&gt;modify b a;&lt;BR /&gt;by id;&lt;BR /&gt;if _IORC_=0 then replace;&lt;BR /&gt;else _ERROR_=0;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 16:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530111#M5657</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2019-01-25T16:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Update</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530112#M5658</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16600"&gt;@SASPhile&lt;/a&gt; please post a better sample dataset that represents your needs.&amp;nbsp; You are piece mealing your request.&amp;nbsp; Don't play the manager role in requesting results please.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 16:27:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530112#M5658</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-01-25T16:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Update</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530113#M5659</link>
      <description>&lt;P&gt;If TableB never has multiple observations for the same ID, you could use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;update b (in=keepme) a;&lt;/P&gt;
&lt;P&gt;by id;&lt;/P&gt;
&lt;P&gt;if keepme;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 16:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530113#M5659</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-01-25T16:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Update</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530114#M5660</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data a;
input id value $ score;
cards;
1 abc 350
2 pqr 275
;
data b;
input id value $ score ;
cards;
1 . 371 
2 pqr 372
;

proc sql;
update b
SET value = (SELECT value
                  FROM a
                  WHERE b.id = a.id)
WHERE value=' ';
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Jan 2019 16:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530114#M5660</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-25T16:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Update</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530116#M5661</link>
      <description>&lt;P&gt;And as a matter of fact, you can push the proc sql update query&lt;STRONG&gt; in-database&lt;/STRONG&gt; and have it done at that level rather than at SAS level.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 16:43:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530116#M5661</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-25T16:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530117#M5662</link>
      <description>&lt;P&gt;Assuming you are just updating value sourcing from Table A, you could use dataset option to keep id and value alone&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data b;
  modify b a(keep=id value);/*drop the rest*/
  by id;
  if _IORC_=0  then replace;
  else _ERROR_=0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Jan 2019 16:48:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update/m-p/530117#M5662</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-25T16:48:53Z</dc:date>
    </item>
  </channel>
</rss>

