<?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 with criteria- inner join in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Update-with-criteria-inner-join/m-p/525736#M5005</link>
    <description>&lt;P&gt;You cannot just refer to different tables in the WHERE caluse, you need to speficy a join somehow.&lt;/P&gt;
&lt;P&gt;There are laods of examples on how to this on the internet (this is not a SAS specific task, it's plain SQL).&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jan 2019 15:18:04 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2019-01-09T15:18:04Z</dc:date>
    <item>
      <title>Update with criteria- inner join</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update-with-criteria-inner-join/m-p/525698#M4998</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to&amp;nbsp;set Column A on Table CONT with value of 1 based on criteria of Column CU on Table CONT and Column Flag on Table CUST.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;UPDATE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; CONT &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SET&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; A = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;WHERE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; CONT.DATE = CUST.DATE AND CONT.C = CUST.C &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;AND CUST.FLAG = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'A'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; AND CONT.CU=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;QUIT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 12:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update-with-criteria-inner-join/m-p/525698#M4998</guid>
      <dc:creator>cmemtsa</dc:creator>
      <dc:date>2019-01-09T12:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Update with criteria- inner join</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update-with-criteria-inner-join/m-p/525736#M5005</link>
      <description>&lt;P&gt;You cannot just refer to different tables in the WHERE caluse, you need to speficy a join somehow.&lt;/P&gt;
&lt;P&gt;There are laods of examples on how to this on the internet (this is not a SAS specific task, it's plain SQL).&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 15:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update-with-criteria-inner-join/m-p/525736#M5005</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2019-01-09T15:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Update with criteria- inner join</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update-with-criteria-inner-join/m-p/525744#M5006</link>
      <description>&lt;P&gt;You might want to try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
UPDATE CONT
SET A = 1
WHERE cu = 1 and 
exists (select * from CUST where date = CONT.DATE AND c = CONT.C and FLAG = 'A');
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Jan 2019 15:49:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update-with-criteria-inner-join/m-p/525744#M5006</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-01-09T15:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Update with criteria- inner join</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Update-with-criteria-inner-join/m-p/525983#M5038</link>
      <description>&lt;P&gt;It worked!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 06:44:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Update-with-criteria-inner-join/m-p/525983#M5038</guid>
      <dc:creator>cmemtsa</dc:creator>
      <dc:date>2019-01-10T06:44:15Z</dc:date>
    </item>
  </channel>
</rss>

