trigger will not execute
- From: Cynthia <Cynthia@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 6 Jun 2006 09:59:01 -0700
I have two similar triggers one on solodata table and one on components table.
I cannot get the trigger on solodata to execute. I have pasted it below.
Below that
I hve pasted the one on components that does run. i checked and extn5 does
change, and the groupid in solodata is 66, I would appreciate any help on why
this is not running.
CREATE TRIGGER [SDLineNo] ON [Solodata]
FOR INSERT, UPDATE
AS
IF UPDATE (ExtN5)
BEGIN
DECLARE @SDL INT
SELECT @SDL = SOLODATALINK FROM INSERTED
UPDATE SOLODATA
SET IsoText = ReportedLineNo
FROM Components CP inner join Solodata SD ON CP.solodatalink =
sd.solodatalink
inner join Commondata CD ON
CP.commondatalink = cd.commondatalink
WHERE sd.GroupID IN (1,6,17,28,51,52,53,55,62,66,67,68) AND sd.ExtN5=1
and SD.solodatalink = @SDL
END
**********THIS IS THE ONE THAT WORKS
CREATE TRIGGER [IsoTextLineNo] ON [Components]
FOR INSERT, UPDATE
AS
IF UPDATE(COMMONDATALINK)
BEGIN
UPDATE SOLODATA
set ISOTEXT =
REPORTEDLINENO + '$VENT/DRAIN/INST$/MD-110 DEG$SEE ' + COMPONENTDESCRIPTION
FROM inserted i inner join commondata cd on i.commondatalink =
cd.commondatalink, solodata, components
where solodata.groupid = 69
and solodata.SoloDataLink = Components.solodatalink
and Components.CommonDataLink = CD.CommonDataLink
--need to have the code below put on solodata table also for change in extn5
UPDATE SOLODATA
set ISOTEXT =
REPORTEDLINENO
FROM inserted i inner join commondata cd on i.commondatalink =
cd.commondatalink, solodata, components
where Solodata.GroupID IN (1,6,17,28,51,52,53,55,62,66,67,68) AND
Solodata.ExtN5=1
and solodata.SoloDataLink = Components.solodatalink
and Components.CommonDataLink = CD.CommonDataLink
END
.
- Follow-Ups:
- RE: trigger will not execute
- From: Cynthia
- RE: trigger will not execute
- Prev by Date: Re: SSIS Exec SQL task and return parameters
- Next by Date: Re: remotely call a DTS
- Previous by thread: Re: SSIS Exec SQL task and return parameters
- Next by thread: RE: trigger will not execute
- Index(es):