From: Jack on

DECLARE @TranName VARCHAR(20)
SELECT @TranName = 'MyTransaction'
BEGIN TRANSACTION @TranName
GO
USE ts2_aldkt_app
GO
update tblcustomer
set sales_ytd = (sales_ytd + 10000)
set sales_lstyr = (sales_lstyr + 10000)
GO
COMMIT TRANSACTION MyTransaction
GO

I am getting the following error:
Line 1: Incorrect syntax near '='.
Any help is appreciated

From: Plamen Ratchev on
Your update statement has two SET clauses, it has to be only one:

UPDATE tblcustomer
SET sales_ytd = (sales_ytd + 10000),
sales_lstyr = (sales_lstyr + 10000);

HTH,

Plamen Ratchev
http://www.SQLStudio.com