<?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 field where two tables match in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/update-field-where-two-tables-match/m-p/355654#M274060</link>
    <description>&lt;P&gt;i think i solved my own problem.&amp;nbsp; here is the code i am using...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;update&amp;nbsp; a&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;set a.z='Y'&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;where exists&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;(select * from b&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;where a.1=b.1 and a.2=b.2 and a.3=b.3&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;and a.4=b.4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i havent checked it but i believe this works well and gets what i need it to.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2017 15:47:02 GMT</pubDate>
    <dc:creator>me55</dc:creator>
    <dc:date>2017-05-03T15:47:02Z</dc:date>
    <item>
      <title>update field where two tables match</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-field-where-two-tables-match/m-p/355644#M274059</link>
      <description>&lt;P&gt;i know this is fairly similar to other posts but i am just missing something about getting this to work right.&amp;nbsp; so i have two tables, a and b with fields that match, 1, 2, 3, 4.&amp;nbsp; so i need to get a field in a to Y on an inner join to table b.&amp;nbsp; i know sql really well but am new to sas and i am using eg.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, if fields 1, 2, 3, and 4 match between the two tables it needs to set a.z='Y'...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 15:22:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-field-where-two-tables-match/m-p/355644#M274059</guid>
      <dc:creator>me55</dc:creator>
      <dc:date>2017-05-03T15:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: update field where two tables match</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-field-where-two-tables-match/m-p/355654#M274060</link>
      <description>&lt;P&gt;i think i solved my own problem.&amp;nbsp; here is the code i am using...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;update&amp;nbsp; a&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;set a.z='Y'&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;where exists&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;(select * from b&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;where a.1=b.1 and a.2=b.2 and a.3=b.3&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;and a.4=b.4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i havent checked it but i believe this works well and gets what i need it to.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 15:47:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-field-where-two-tables-match/m-p/355654#M274060</guid>
      <dc:creator>me55</dc:creator>
      <dc:date>2017-05-03T15:47:02Z</dc:date>
    </item>
  </channel>
</rss>

