Hi All,
I want to create this Trigger:
But when parsed I get an error:
Msg 156, Level 15, State 1, Procedure TR_Info_Insertion, Line 3
Incorrect syntax near the keyword 'CASE'.
Obviously not right, but from my understanding of the docs then it should be! Could someone tell me where I'm going wrong please.
--
woogoo
I want to create this Trigger:
Code:
CREATE TRIGGER [dbo].[TR_Info_Insertion] ON [dbo].[Information] FOR INSERT AS
BEGIN
CASE Inserted.VarType
WHEN 'EB' THEN Inserted.EB = Inserted.Price
WHEN 'ES' THEN Inserted.ES = Inserted.Price
END
END ;
Msg 156, Level 15, State 1, Procedure TR_Info_Insertion, Line 3
Incorrect syntax near the keyword 'CASE'.
Obviously not right, but from my understanding of the docs then it should be! Could someone tell me where I'm going wrong please.
--
woogoo