Groups | Blog | Home
all groups > sql server (alternate) > december 2006 >

sql server (alternate) : Problem with trigger


Jimbo
12/21/2006 9:26:27 AM
Im having problems with an after insert trigger...

Im trying to join the INSERTED table with other tables to retrieve
data....Some of these tables it must link to get data inserted into
them at the same time my original table does...my question is why when
the trigger runs, my sql statement gets no data...however afterwards if
I run the statement and use the primary key that was just inserted, the
statement brings up data?..

I hope I was clear enough..

-Jim
Hugo Kornelis
12/21/2006 10:54:56 PM
[quoted text, click to view]

Hi Jim,

No, you were not.

Please post CREATE TABLE statements to reproduce your tables (you may
omit irrelevant columns, but please do include all keys, properties, and
indexes), the CREATE TRIGGER statement with your current, non-working
trigger code, some INSERT statements with sample data, the expecte
results and the results yoou are actuallly seeing. That allows us to
reproduce your problem by cut and paste, and to test if our suggestions
match the desired resuls.

--
AddThis Social Bookmark Button