BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I need a code for the following scenerio
In a dataset I have columns like Acc_sk,Acc_ID, Coll_Status,Valid_from and Valid_to

Dataset:Account
Acc_sk Acc_ID Coll_Status Valid_from Valid_to
1 001 open 4-13-2009 12:00:09 PM 4-13-2009 23:00:09 PM
2 001 closed 4-13-2009 12:00:10 PM 1-1-2010 23:00:09 PM
3 001 open 1-1-2010 23:00:09PM 1-1-5999 00:00:00
4 002 open 4-13-2009 12:00:09 PM 4-13-2009 23:00:09 PM
5 002 closed 4-13-2009 12:00:10 PM 1-1-5999 00:00:00
I need to apply check in this table that wether the difference between valid_from of each Acc_ID where max(valid_to) and valid_to of its previus row should be of one sec.
Moreover I need to make it generic where the value of target table will be in a macro and also the value of columns(like Acc_ID) will also be stored in a macro as a comma separated list.(means it could be one column or combination of one or more columns)
1 REPLY 1
Patrick
Opal | Level 21
What if:
- you give us a working test dataset (valid input statement).
- you give us an example showing based on the testdata showing how the desired result should look like.

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
  • 1 reply
  • 616 views
  • 0 likes
  • 2 in conversation