<?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 value in table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498868#M132649</link>
    <description>&lt;P&gt;It is not clear what table c_ga belongs to but&amp;nbsp;the query&amp;nbsp;should either&amp;nbsp;be :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc SQL;
Update apple.zz as d
Set x = 'Y'
where 
    x='N' and
    c_ga=5 and
    exists (select * from apple.hh where drd=20 and ID = d.id);
Quit;

/* OR */

Proc SQL;
Update apple.zz as d
Set x = 'Y'
where 
    x='N' and
    exists (select * from apple.hh where drd=20 and c_ga=5 and ID = d.id);
Quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Sep 2018 21:33:36 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2018-09-25T21:33:36Z</dc:date>
    <item>
      <title>Update value in table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498833#M132641</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi I am trying to update the value for x in table zz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Proc SQL;&lt;BR /&gt;Update apple.zz&lt;BR /&gt;Set x = 'Y';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select * from apple.hh p&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; join apple.zz d&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on d.id = p.ID&lt;BR /&gt;and p.drd = 20&lt;BR /&gt;and c_ga =5&lt;BR /&gt;and x = 'N');&lt;BR /&gt;Quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can anyone please help&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 19:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498833#M132641</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2018-09-25T19:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Update value in table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498855#M132645</link>
      <description>&lt;P&gt;What did you try to do with that select in brackets?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 20:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498855#M132645</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-25T20:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Update value in table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498866#M132648</link>
      <description>I am not sure if my code works it might be wrong too</description>
      <pubDate>Tue, 25 Sep 2018 21:23:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498866#M132648</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2018-09-25T21:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Update value in table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498868#M132649</link>
      <description>&lt;P&gt;It is not clear what table c_ga belongs to but&amp;nbsp;the query&amp;nbsp;should either&amp;nbsp;be :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc SQL;
Update apple.zz as d
Set x = 'Y'
where 
    x='N' and
    c_ga=5 and
    exists (select * from apple.hh where drd=20 and ID = d.id);
Quit;

/* OR */

Proc SQL;
Update apple.zz as d
Set x = 'Y'
where 
    x='N' and
    exists (select * from apple.hh where drd=20 and c_ga=5 and ID = d.id);
Quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 21:33:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498868#M132649</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-09-25T21:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Update value in table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498887#M132654</link>
      <description>&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT color="#0000ff"&gt;x&lt;/FONT&gt;,c_ga is from apple.zz table &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and drd from apple.hh table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 22:25:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498887#M132654</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2018-09-25T22:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Update value in table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498890#M132655</link>
      <description>&lt;P&gt;It worked . Thank you So much&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 22:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-value-in-table/m-p/498890#M132655</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2018-09-25T22:45:38Z</dc:date>
    </item>
  </channel>
</rss>

