Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 insteat of insert
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 12/15/2012 :  16:04:56  Show Profile  Reply with Quote
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
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
c1.WifePersonId = c2.WifePersonId
where(c2.EndDate) < (c1.Startdate)


i am student at technology university

Flowing Fount of Yak Knowledge

United Kingdom
2179 Posts

Posted - 12/16/2012 :  02:12:18  Show Profile  Visit jackv's Homepage  Reply with Quote
Why do you want to do this via a TRIGGER?

Jack Vamvas
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000