I have 3 tables In DB.
Def (ObjectIdx PK, ObjectN, ObjectType)
Conf1 (CylinderId PK, Name, ...)
Conf2 (EngineId PK, Name, ...)
Is anyone know how to make relationship with rule below.
Def.ObjectN =Conf1.CylinderId and Def.ObjectType =1
Def.ObjectN =Conf2.EngineId and Def.ObjectType =2
I frogetted... it's MS SQL Server 2000
--
Plamen Ratchev
http://www.SQLStudio.com
Thanks PR, but this solution i checked before. Sorry, i didn't write this.
In that example you have to add column and fill it the same value.
I'm looking for another idea.
Hi ArekK,
That's the only way using DRI (declare referential integrgity). If you
don't want to do that, then I guess triggers are the only safe option.
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis