BookmarkSubscribeRSS Feed
saslackey
Calcite | Level 5
this is my table

id statename associationname code price
1 texas TX 3435 234
2 alabama FLC 2342 345
3 alabama FLB 35443 345
4 alabama ALC 3445 356

Now i want to make changes such that if statename= alabama and associationname=FLC

i want to change associationname to AL

pls help thanks in advance
3 REPLIES 3
DBailey
Lapis Lazuli | Level 10
proc sql;
update table tablename
set associationname='AL'
where statename='alabama' and associationname='FLC';
quit;

There are other approaches if you have more than you can handle programming manually.
saslackey
Calcite | Level 5
sorry it is a dataset and not a table
DBailey
Lapis Lazuli | Level 10
table/dataset terms mean the same thing in SAS.

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

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 1452 views
  • 0 likes
  • 2 in conversation