Skip to Content
0
Former Member
Dec 21, 2012 at 06:52 AM

need Some info about sp_trasaction notification

104 Views

Hi..

I need some info about sp_trasctin notification

in ohem i put one udf....actually this is varchar...

what i need is if any body addding the document..

the duplicates should not be allow..

i put this code in sp_trasction notification

but showing erros like below sp i past it error.

declare @srno as int

declare @count as int

IF (@transaction_type = 'A' or @transaction_type = 'U') AND @object_type = '53'

BEGIN

set @srno=(Select U_EPF from OHEM where empID=@list_of_cols_val_tab_del)

set @count=(Select count(*) from OHEM T0 where T0.U_EPF='@srno')

if @count>1

begin

SET @error = 10

SET @error_message = 'Plz enter the diff EPF Number'

end

end

error is

Msg 137, Level 15, State 2, Line 5

Must declare the scalar variable "@transaction_type".

Msg 137, Level 15, State 2, Line 9

Must declare the scalar variable "@list_of_cols_val_tab_del".

Msg 137, Level 15, State 1, Line 17

Must declare the scalar variable "@error".

Msg 137, Level 15, State 1, Line 19

Must declare the scalar variable "@error_message".