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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 insteat of insert

Author  Topic 

loreel
Starting Member

2 Posts

Posted - 2012-12-15 : 15:59:18
Hi every body i wanna ask about insteat of insert :
why the row that i inserted is being only read and is not saved ?
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

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-12-16 : 20:17:21
what do you mean by "only read and is not saved" ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -