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.
| Author |
Topic |
|
eddy556
Starting Member
36 Posts |
Posted - 2009-01-27 : 11:06:09
|
I have a trigger set onto a table in a database - however it only seems to fire when manually editing the data using management studio and not when a stored procedure is run against the data.This is the procedure:USE [COSHH2008]GO/****** Object: Trigger [dbo].[KeepUpdated4] Script Date: 01/27/2009 15:47:44 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER TRIGGER [dbo].[KeepUpdated4] on [dbo].[Material]FOR UPDATE, INSERT ASUPDATE mSET m.LastUpdate = GetDate()FROM dbo.Material mINNER JOIN inserted i ON m.MTRLCODE =i.MTRLCODEWHERE (m.KEYWORD<>i.KEYWORDOR m.MATCON<>i.MATCONOR m.HAZLEVEL<>i.HAZLEVELOR m.MDATE<>i.MDATEOR m.SUPPCODE<>i.SUPPCODEOR m.KEYCODE<>i.KEYCODEOR m.SOLID<>i.SOLIDOR m.HAZSPEC<>i.HAZSPECOR m.LastUpdate IS NULL) |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-01-27 : 11:23:27
|
quote: This is the procedure:
The code you posted is the trigger - not the SPTry calling the procedure in SSMS, confirm the SP actuallly changed data in Material.Be One with the OptimizerTG |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-27 : 12:00:51
|
| is the stored procedure doing a bulk insert? |
 |
|
|
|
|
|