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;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 610 views
  • 1 like
  • 2 in conversation