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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1109 views
  • 0 likes
  • 3 in conversation