I am having a specific problem with coding in SQL, and I was curious if you could give me any advice.
I have entered this code:
CREATE TRIGGER UpdateAfterPayment On SupplierTransactionDetails For Insert, Update, Delete As Update S If i.DebitValue>0 S.Balance = S.Balance + i.DebitValue else S.Balance = S.Balance - i.CreditValue from SupplierTransactionHead H, Suppliers S join inserted i On S.SupplierID=H.SupplierID and H.transectionID=i.TransectionID
And I am receiving this error:
Msg 102, Level 15, State 1, Procedure UpdateAfterPayment, Line 6 Incorrect syntax near 'S'
Could you tell me why?
August 4, 2008 2:31 PM
August 4, 2008 8:29 PM