BookmarkSubscribeRSS Feed
ssmiley96
Calcite | Level 5

I have a process flow that queries a SQL db and can generate a data set that will be written to another SQL db. I'd like to add a primary key or at the very least, a unique index, such that when my SQL table is loaded, it will reference the pk. 

 

Is this possible? If so, can it be done in Query Builder or do I have to add that syntax in proc sql?

1 REPLY 1
SASKiwi
PROC Star

Adding a primary key to an external database will require syntax specific to the SQL language used by that database. You will need to use SQL passthru and the SQL EXECUTE statement, so it will require a coded solution.

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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