Quantcast
Viewing all articles
Browse latest Browse all 379

Changing a Custom Column to a FK column

Hey gurus, it has been awhile! I have been working with Quest onsite for about two weeks and learned a lot but I still find some stuff that stumps me.

 

In order to handle the CSV import of some data to the UNSGroupB table, we had to create a custom script in PRD that did the import. In the PRD environment, we extended the schema to include two columns, let's call them NewColumn1 and New Column2. When they were created in PRD, we set them to be Foreign Key columns. Unfortunately, I forgot this when I added the new columns to Dev. They are there but they are not set to be Foreign Key and as a result, our import fails. Is there an easy way to convert these columns to Foreign Keys?

 

According to what I read online, I can use the SQL ALTER command but I am not sure of what other syntax elements are needed. Can I simply do ALTER UnsGroupB.NewColumn1, set isFK = 'True'? Or do I need to know what the FK column will connect to? I suppose that in a worse case scenario, I could always delete the two columns I added and then re-do the Schema Extension to fix them but if there is an easier way then that's whta I want to do.

 

Please advise. Thanks!


Viewing all articles
Browse latest Browse all 379

Trending Articles