BookmarkSubscribeRSS Feed
Francisco
Calcite | Level 5

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:

 

AMOUNT SITUATION

100        

200

530

 

When "AMOUNT" <500 , then UPDATE field "SITUATION" with the char "Menores", and if AMOUNT >=500, then UPDATE with the char "Mayores".

 

I tried, but I couldn't fix it. Is possible makei without a code? (just using the GUI of EG)

 

Thanks in advanced.

1 REPLY 1
Reeza
Super User
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.

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.

data want;
set want;
if amound>500 then situation='Menores';
else if amount>=500 then situation='Mayores';
run;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1256 views
  • 0 likes
  • 2 in conversation