|
loreel
Starting Member
Syria
2 Posts |
Posted - 12/15/2012 : 16:04:56
|
Hi ,please i wanna help. is that Correct? i wanna check that the woman didn't married before the start date that i wanna to insert..... Create TRIGGER [dbo].[trig_Couple] ON [dbo].[Couple] instead of INSERt AS Begin Insert Couple(CoupleId,HusbandPersonId,WifePersonId,Startdate,EndDate) Select c1.CoupleId,c1.HusbandPersonId,c1.WifePersonId,c1.Startdate,c1.EndDate from Inserted c1 inner join Couple c2 on c1.WifePersonId = c2.WifePersonId where(c2.EndDate) < (c1.Startdate) End
i am student at technology university |
|