Hi,

very much new in creating a trigger, here's my trigger script:

Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[tr_partial_UPDATE]
ON [dbo].[sc_partial]
FOR UPDATE AS

IF UPDATE(col_amount)
DECLARE @sc_date datetime, @acct_no varchar(12), @acct_type char(3), @sc_amt decimal(21,6), @col_amt decimal(21,6)
SELECT @sc_date = p.sc_date,
		@acct_no = p.acct_no,
		@acct_type = p.acct_type, 
		@sc_amt = p.sc_amount, 
		@col_amt = p.col_amount 
FROM 
	sc_partial p 
WHERE 
	p.acct_no = p.acct_no and p.acct_type = p.acct_type and p.sc_date = p.sc_date

IF(@sc_amt = @col_amt)
	BEGIN
		DELETE FROM sc_partial WHERE sc_date = @sc_date and acct_no = @acct_no and acct_type = @acct_type
		IF EXISTS(select * from sc_full where sc_date = @sc_date and acct_no = @acct_no and acct_type = @acct_type)
			UPDATE sc_full SET col_amount = @col_amt WHERE sc_date = @sc_date and acct_no = @acct_no and acct_type = @acct_type
		ELSE
			INSERT sc_full VALUES (@sc_date,@acct_no,@acct_type,@col_amt)
	END
when I run an update...the trigger does not fire
Code:
update sc_partial set col_amount = 300
where sc_date = '2012-04-30' and acct_no = '000168241453' and acct_type = 'SDA'
the sc_amount is 300 and it should fire since the col_amount turns to 300 also, but nothing happens.