PtboGiser
asked on
Update Trigger
I would like to pull the Street_Full_Name and AnnoName columns from my Street Table Where StreetID in the Segment Table = StreetId in the Street Table when there has been a insertion or Update on my Street.
AS well i will need it to fire or a separate Trigger to fire when there has been and insertion or Update on the Segment table
How best to handle something like ?
Segment Table Trigger(which is not working)
AS well i will need it to fire or a separate Trigger to fire when there has been and insertion or Update on the Segment table
How best to handle something like ?
Segment Table Trigger(which is not working)
ALTER TRIGGER [dbo].[FName_AName_Num_Las<wbr ></wbr>tdate_Cont<wbr ></wbr>_Segment] ON [dbo].[Segment]
AFTER INSERT, UPDATE
AS
BEGIN
SET NOCOUNT ON;
UPDATE Segment
SET Street_Full_Name = st.Street_Full_Name,
AnnoName = st.AnnoName
FROM dbo.Segment s
INNER JOIN INSERTED i ON s.OID = i.OID
INNER JOIN dbo.Street st ON s.Street_ID = st.Street_ID
END
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thx