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.

CFC_SAS_Communities_400x225.jpgCFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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