<?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 a table based on the values of another table in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78278#M669</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From you description, it sounds like standard processing, which could be performed by some standard transformations, probably no need for User Written. If B is seen as a transactions/changed data, use the Table Loader (Update Load method).&lt;/P&gt;&lt;P&gt;SQL Join could also work. Which one to use depends on the nature of your application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Sep 2013 11:53:16 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2013-09-11T11:53:16Z</dc:date>
    <item>
      <title>update a table based on the values of another table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78276#M667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to update a table A based on the values of table B using SAS DI studio?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table A and Table B has a common variable Var1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to update the column of A if&amp;nbsp; matching values of Var1 exists in B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sheeba Swaminathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 01:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78276#M667</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2013-09-11T01:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: update a table based on the values of another table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78277#M668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a user written transformation and use a datastep update statement.&amp;nbsp; You could also use a hash table, but that would depend on the size of the table and the amount of memory you have available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA A;&lt;/P&gt;&lt;P&gt;DO ID = 1 TO 10;&lt;/P&gt;&lt;P&gt;AMOUNT = INT(RANUNI(0)*500);&lt;/P&gt;&lt;P&gt;OUTPUT;&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SORT DATA=&amp;amp;SYSLAST.;&lt;/P&gt;&lt;P&gt;BY ID;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA B;&lt;/P&gt;&lt;P&gt;DO ID = 1 TO 10 BY 2;&lt;/P&gt;&lt;P&gt;AMOUNT = INT(RANUNI(0)*500);&lt;/P&gt;&lt;P&gt;OUTPUT;&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SORT DATA=&amp;amp;SYSLAST.;&lt;/P&gt;&lt;P&gt;BY ID;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;DATA WANT;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; UPDATE A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B;&lt;/P&gt;&lt;P&gt;&amp;nbsp; BY ID;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 02:14:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78277#M668</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2013-09-11T02:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: update a table based on the values of another table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78278#M669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From you description, it sounds like standard processing, which could be performed by some standard transformations, probably no need for User Written. If B is seen as a transactions/changed data, use the Table Loader (Update Load method).&lt;/P&gt;&lt;P&gt;SQL Join could also work. Which one to use depends on the nature of your application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 11:53:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78278#M669</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-09-11T11:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: update a table based on the values of another table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78279#M670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at the Update transform DI Studio 4.4. it supports Updates with Correlated Sub Queries&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; update table &lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; set column_A =&amp;nbsp; &lt;/P&gt;&lt;P&gt; ( SELECT column_B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; FROM B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; WHERE&amp;nbsp; B.Var1 = &lt;SPAN style="font-size: 16pt;"&gt;A.Var1&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 15:31:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78279#M670</guid>
      <dc:creator>Michael_SAS</dc:creator>
      <dc:date>2013-09-11T15:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: update a table based on the values of another table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78280#M671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Scott. I will try out this method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 20:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78280#M671</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2013-09-11T20:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: update a table based on the values of another table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78281#M672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Linush.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try out that as I want to reduce the user written transformations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 20:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78281#M672</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2013-09-11T20:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: update a table based on the values of another table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78282#M673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Michael.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try out the update transform with exist keyword.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 20:55:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/update-a-table-based-on-the-values-of-another-table/m-p/78282#M673</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2013-09-11T20:55:45Z</dc:date>
    </item>
  </channel>
</rss>

