Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
May 29, 2012 01:11 PM|LINK
Need some help on how to acheive this.
Table 1: Deals (PK DealId)
Table 2: DealEvents (PK DealId)
DealFamilyId (computed persisted '1')
Table 3: DealTypes (PK DealTypeId)
I want to create a relationship between Table1 and Table2.
Table2 must be constrained using a FK on DealId plus Table2:DealFamilyId must = DealFamilyId belonging to the Table1:DealTypeId derived from the lookup Table3.
In the example above, inserts should only be allowed into Table2 where Table1:DealTypeId has a Table3:DealFamilyId = 1.
Hope this makes sense.