Help using Base SAS procedures

updating a table

Reply
Contributor
Posts: 22

updating a table

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
Super Contributor
Posts: 578

Re: updating a table

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.
Contributor
Posts: 22

Re: updating a table

sorry it is a dataset and not a table
Super Contributor
Posts: 578

Re: updating a table

table/dataset terms mean the same thing in SAS.
Ask a Question
Discussion stats
  • 3 replies
  • 110 views
  • 0 likes
  • 2 in conversation