<?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 field conditioning another field in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Update-a-field-conditioning-another-field/m-p/236501#M17058</link>
    <description>You can use Query Builder with a computed column. Use either advanced with a CASE statement or a variable RECODE. If you're going through the point and click the RECODE option may be easier for you.&lt;BR /&gt;&lt;BR /&gt;I don't know think EG supports updates in place, but it looks like a new variable anyways. Otherwise if you really need to only update the table, you may want to write a data step.&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set want;&lt;BR /&gt;if amound&amp;gt;500 then situation='Menores';&lt;BR /&gt;else if amount&amp;gt;=500 then situation='Mayores';&lt;BR /&gt;run;</description>
    <pubDate>Wed, 25 Nov 2015 21:38:30 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-11-25T21:38:30Z</dc:date>
    <item>
      <title>Update a field conditioning another field</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Update-a-field-conditioning-another-field/m-p/236495#M17057</link>
      <description>&lt;P&gt;Hi. I'm new with SAS and I have a problem with EG 5.1. I need Update a Field, but conditioning another field. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AMOUNT SITUATION&lt;/P&gt;
&lt;P&gt;100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;200&lt;/P&gt;
&lt;P&gt;530&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When "AMOUNT" &amp;lt;500 , then UPDATE field "SITUATION" with the char "Menores", and if AMOUNT &amp;gt;=500, then UPDATE with the char "Mayores".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried, but I couldn't fix it. Is possible makei without a code? (just using the GUI of EG)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advanced.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 20:54:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Update-a-field-conditioning-another-field/m-p/236495#M17057</guid>
      <dc:creator>Francisco</dc:creator>
      <dc:date>2015-11-25T20:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Update a field conditioning another field</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Update-a-field-conditioning-another-field/m-p/236501#M17058</link>
      <description>You can use Query Builder with a computed column. Use either advanced with a CASE statement or a variable RECODE. If you're going through the point and click the RECODE option may be easier for you.&lt;BR /&gt;&lt;BR /&gt;I don't know think EG supports updates in place, but it looks like a new variable anyways. Otherwise if you really need to only update the table, you may want to write a data step.&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set want;&lt;BR /&gt;if amound&amp;gt;500 then situation='Menores';&lt;BR /&gt;else if amount&amp;gt;=500 then situation='Mayores';&lt;BR /&gt;run;</description>
      <pubDate>Wed, 25 Nov 2015 21:38:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Update-a-field-conditioning-another-field/m-p/236501#M17058</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-25T21:38:30Z</dc:date>
    </item>
  </channel>
</rss>

