Last post Nov 13, 2015 11:23 AM by limno
Nov 13, 2015 05:31 AM|tvb2727|LINK
Is there a way to update a table that has a FK to a domain table if the Value IS NOT found in the domain table?
This column allows Nulls OR has to be in a domain table. If I take legacy data from one column to put it in a new column, I want to force a NULL value if it isn't found in the Domain table. Is there a way to run one update statement and it do that so it
doesn't error out on each one that needs a null value?
OR do I need to turn off the FK connection and then turn it back on AFTER I move all the data like I want etc?
Nov 13, 2015 10:18 AM|wmec|LINK
You can't as the FK must exist within its parent table as one PK of the table, which also does
not allow NULL values.
Nov 13, 2015 11:23 AM|limno|LINK
You just need to set your foreign key column NULLABLE to accept null values.