I am trying to set up a sql trigger. I have a customer rewards program. I need a field to update when there sales updates. Does anyone know why this trigger is kicking out errors?
CREATE TRIGGER [TR_CPNUpdate] ON [dbo].[customer] FOR UPDATE AS IF [customer.totalsales] - [customer.customnumber1] > 50 UPDATE [customer.customnumber1] SET customnumber1 = (customnumber1 + 50) GO
The errors I am getting are "Invalid column name 'customer.totalsales" & "customer.Customnumber1"
any ideas?