How can I create a counter in a select statement for a unique ID?
Use a data step, not SQL
@yaakov555 wrote:
How can I create a counter in a select statement for a unique ID?
By using normal SAS code.
data want;
id+1;
set have;
run;
monotonic() but depends on the query exactly.
What would your counter be counting?
1,2,3,4,5
@yaakov555 wrote:
1,2,3,4,5
Those are the numbers that the counter produces. It does not explain what is being counted.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.