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?
Software/Hardware used:
ASKED:
August 4, 2008 2:31 PM
UPDATED:
August 4, 2008 8:29 PM
Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.