Click here to Skip to main content
15,901,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have two table like
SQL
Master_data_record(id uniqueidentifier)


SQL
Child_data_record(id uniqueidentifier)


Now i want to create the FK between this two table .
which allows only those rows for insert in child_data_record having id present in master except 00000000-0000-0000-0000-000000000000
and in master there is no such id (00000000-0000-0000-0000-000000000000)
also i can not insert this id in master.

how can i create the FK with this ZERO Id check ?
Posted

I believe Ur puchish the data using StoredProcedure....make the checking in SP while puching the data in the table.
 
Share this answer
 
Comments
RDBurmon 16-Nov-10 23:46pm    
No man this is not a write way , we have 50+ SP so by using your way we have to look all the sp and add the condition . this is not a right way man.....
No such feature in sql server and couldnit found solution for my issue
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900