BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ger15xxhcker
Quartz | Level 8

There is a table with a uniqe ID. This is an external time stamp table (yymmdd).I'd like to check if a fields (in the previous month) A colums, B columns and C columns have changed on the same ID in this table then we will update field  in the new table e.g: D:='Y'. If the table does not exist then do not nothing.

 

Thanks!

 

 

1 ACCEPTED SOLUTION
3 REPLIES 3
ger15xxhcker
Quartz | Level 8

Thanks, but how can i define a column value to the new dataset based on these result? I shows the diff but how can i use it to in a data set to add the flg value to 'Y'

 

e.g:

data have190430;
input ID	(Startdate Enddate)(:date11.)	Name $ Flg $;
format Startdate Enddate date11.;
datalines;
1	26-Sep-13	26-Sep-13	Erloti    n
2	23-Oct-13	23-Oct-13	AAAAAA    n
3	22-Nov-13	22-Nov-13	Erloti    n
4	16-Dec-13	16-Dec-13	Erloti    n
;
run;

data have190331;
input ID	(Startdate Enddate)(:date11.)	Name $ Flg $;
format Startdate Enddate date11.;
datalines;
1	26-Sep-13	26-Sep-13	Erloti    n
2	23-Oct-13	23-Oct-13	Erloti    y
3	22-Nov-13	22-Nov-13	Erloti    n
4	16-Dec-13	16-Dec-13	Erloti    n
;
run;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1174 views
  • 1 like
  • 2 in conversation