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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1108 views
  • 0 likes
  • 2 in conversation