Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
YAQ on Foreign Key constraint
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Database management
Miscellaneous
Thread ID:
01457802
Message ID:
01457856
Views:
28
>>>>>>Hi,
>>>>>>
>>>>>>I am still getting a "conflict" message when trying to create a foreign key constraint. I checked that the table with the foreign key has only those entries in the key column that are present in the unique column of the parent table. The only thing is that the foreign key table has some records with empty value in the foreign key field. Could this be the problem? (I thought that empty column records are not counted in the constraint but maybe I am mistaken).
>>>>>>
>>>>>>TIA.
>>>>>
>>>>>You can add NOCHECK when creating a constraint.
>>>>
>>>>I know. But I wanted to see what was causing the conflict.
>>>
>>>Well, obviously empty values are not allowed (and NULLs are allowed).
>>
>>Yes, I know now.
>
>I knew it long time ago. Same thing in VFP, as far as I know.

I never set referential integrity in the VFP database, always in my own code. I guess this is why I never came across this issue.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform