BookmarkSubscribeRSS Feed
David_Billa
Rhodochrosite | Level 12

Will it works if the new data is inserted or if any existing data is deleted?

ChrisNZ
Tourmaline | Level 20
I don't understand the question. As you can see this answers the need you expressed.Adapt the code to your exact data.
David_Billa
Rhodochrosite | Level 12

If my trans data is as below then the MASTER dataset is not updating as we want. I tried to tweak your code but it didn't helped either.

 

data TRANS;
input (Id  Name  Sales   Transaction   Example  Act_Ind   Valid_From  Valid_To) (:$20.);
cards;
4   Track   False  10  121216  Y   20200404T000000   99991231T235959
run;
ChrisNZ
Tourmaline | Level 20

Did you read the document I pointed to?
To insert new records, you need to test for   _DSENOM   and   output   the new record.

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
  • 18 replies
  • 4407 views
  • 3 likes
  • 5 in conversation