SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


After Trigger


After Trigger

Author
Message
Paul Paiva
Paul Paiva
SSC Eights!
SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)

Group: General Forum Members
Points: 863 Visits: 265
I read the contents of one particular column of the inserted table, but it is mysteriously not there. I get zero (datatype is money, Null). Immediately after the trigger fires, I SELECT from the table and the column has been inserted correctly. I'm doing similar things with other columns, and all is well there.

I've tried adding some logging into a log table to verify my observations (INSERT INTO LogTable SELECT MissingCol, GetDate() FROM inserted). I've done extensive work with triggers for years, and I'm pretty sure I'm doing all the normal things correctly.

There's really no other code to show. I'm thinking this is a SQL bug of some sort but I haven't found it yet on the MS site. Has anyone encountered such an anomaly?

Thanks
Paul

- Paul

http://paulpaivasql.blogspot.com/
GilaMonster
GilaMonster
SSC Guru
SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)

Group: General Forum Members
Points: 115856 Visits: 45520
Haven't heard of this happening before.

Can you post the trigger code, the table schema and the insert statement that you tried?

What's the version of your SQL server? What SP?

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search