<?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 fields in one table based on another table. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195711#M48952</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 2 SAS tables, HRIS and FAKC.&amp;nbsp; Both tables have a unique ID of NBKID.&amp;nbsp; The HRIS table has 276,438 records, and the FAKC table has 415 records.&lt;/P&gt;&lt;P&gt;I need a SAS procedure to update records in the HRIS table, based on fields in the FAKC table.&lt;/P&gt;&lt;P&gt;Specifically, when the NBKID’s match, I need to update the HRIS table field LobName, with the FAKC table field value FakcLobName, and the field AltLob with the value “FAKC”.&lt;/P&gt;&lt;P&gt;Actually I need to update other fields as well, but if you can help me with this, I can probably figure the rest out&lt;/P&gt;&lt;P&gt;I'm new to SAS and just learning, so please be specific in you reply.&lt;/P&gt;&lt;P&gt;Thanks in advance for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Apr 2015 17:09:37 GMT</pubDate>
    <dc:creator>jhrbanker</dc:creator>
    <dc:date>2015-04-14T17:09:37Z</dc:date>
    <item>
      <title>Update fields in one table based on another table.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195711#M48952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 2 SAS tables, HRIS and FAKC.&amp;nbsp; Both tables have a unique ID of NBKID.&amp;nbsp; The HRIS table has 276,438 records, and the FAKC table has 415 records.&lt;/P&gt;&lt;P&gt;I need a SAS procedure to update records in the HRIS table, based on fields in the FAKC table.&lt;/P&gt;&lt;P&gt;Specifically, when the NBKID’s match, I need to update the HRIS table field LobName, with the FAKC table field value FakcLobName, and the field AltLob with the value “FAKC”.&lt;/P&gt;&lt;P&gt;Actually I need to update other fields as well, but if you can help me with this, I can probably figure the rest out&lt;/P&gt;&lt;P&gt;I'm new to SAS and just learning, so please be specific in you reply.&lt;/P&gt;&lt;P&gt;Thanks in advance for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 17:09:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195711#M48952</guid>
      <dc:creator>jhrbanker</dc:creator>
      <dc:date>2015-04-14T17:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Update fields in one table based on another table.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195712#M48953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming all fields need to be updated and that if a record isn't found in HRIS table it needs to be added use the UPDATE statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000202975.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000202975.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001329151.htm" title="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001329151.htm"&gt;Step-by-Step Programming with Base SAS(R) Software&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://kb.iu.edu/d/aljg" title="https://kb.iu.edu/d/aljg"&gt;https://kb.iu.edu/d/aljg&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 17:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195712#M48953</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-04-14T17:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Update fields in one table based on another table.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195713#M48954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All fields do not need to be updated (HRIS has 151 fields &amp;amp; FAKC has 26 fields).&amp;nbsp; The only fields that need to be updated are AltLob &amp;amp; LobName.&lt;/P&gt;&lt;P&gt;The HRIS LobName field needs to be updated with the value of the FAKC LobName field.&amp;nbsp; And the AltLob field needs to be populated with "FAKC".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of the records in the FAKC table have a matching record in the HRIS table.&amp;nbsp; But not visa versa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide the required code or an example of how to use the Update statement.&amp;nbsp; I'm new to SAS and just learning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 17:32:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195713#M48954</guid>
      <dc:creator>jhrbanker</dc:creator>
      <dc:date>2015-04-14T17:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Update fields in one table based on another table.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195714#M48955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the NBKID field duplicated in the HRIS data set?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 17:48:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195714#M48955</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-04-14T17:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Update fields in one table based on another table.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195715#M48956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&amp;nbsp; The NBKID field is the key field in both tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 17:50:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195715#M48956</guid>
      <dc:creator>jhrbanker</dc:creator>
      <dc:date>2015-04-14T17:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Update fields in one table based on another table.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195716#M48957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The links above have code and detailed comments. If you only have certain fields that need updating only keep those in your dataset use the keep = on the update statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update master transaction(keep=nbkid field1_update field2_update);&lt;/P&gt;&lt;P&gt;by nbkid;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 18:21:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Update-fields-in-one-table-based-on-another-table/m-p/195716#M48957</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-04-14T18:21:33Z</dc:date>
    </item>
  </channel>
</rss>

