BookmarkSubscribeRSS Feed
Liliya95
Fluorite | Level 6

Whether it is possible to write down the request for creation of a temporary table with instructions of external and internal key?

for example,

 

% macro test;


 data(keep one two three);


length one $50 two $50 three 8;


%mend test;

 I need to specify that one is the primary key. Can this be done?

 

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Primary keys come from the database world, they are not a SAS thing.  Two different technologies!  You can fake it with:

https://communities.sas.com/t5/Base-SAS-Programming/Primary-key/td-p/456421

@s_lassen

 

However why?  Start thinking SAS if your going to use SAS, its different technology to databases.

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