BookmarkSubscribeRSS Feed
May15
Obsidian | Level 7

Hi all,

 

Supposing we have a table A which has a field/column as foreign key but we don't need it anymore, what is the best practice to delete this field as foreign key in SAS DIS?

 

Going to the properties of the table and excluding it from the tab keys doesn't seem to be enough. Running the proc contents of the table B which has this field as primary key we still see the reference.

 

 

Thanks,

 

May15

4 REPLIES 4
RahulG
Barite | Level 11

You are updating the metadata information when you are Going to the properties of the table and excluding it from the tab keys .

 

But physical table still has that properties.

 

I would suggest to make change in your physical dataset and then update table metadata. 

May15
Obsidian | Level 7

Hi RahulG,

 

Thanks for your reply.

 

How would you make change in physical data set?

 

 

Thanks,

 

May15

LinusH
Tourmaline | Level 20
PROC DATASETS.
Data never sleeps
May15
Obsidian | Level 7

Hi LinusH,

 

I actually can't see anymore the foreign key in what I called table A.

The issue is that in table B, which has the primary key that is referred to the foreign key, I still see the referential constraint. How can I remove it without dropping and recreating the table B?

 

Output_2.PNG

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1157 views
  • 0 likes
  • 3 in conversation