Taylor
Taylor

Reputation: 143

Getting Error During Updation

update refShippingTypes set ([Code],[Name],[Notes]) Values (N'AUDELIVERY',N'Ekart AU Delivery',N'EKart') where ShippingTypeId=50

When I am running this query getting this error Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '('.

Anyone, please tell why I am getting an error. Still, I am thinking this is a too simple script but where I am mistaken.

Upvotes: 0

Views: 33

Answers (3)

Belinda Vetesi
Belinda Vetesi

Reputation: 19

I would try the following query:

UPDATE refShippingTypes SET Code=N'AUDELIVERY', Name=N'Ekart AU Delivery', Notes=N'EKart' WHERE ShippingTypeId=50

Hope that helps you!

Upvotes: 1

Jens
Jens

Reputation: 69440

You Syntax is wrong. It must be:

update refShippingTypes 
     set [Code] = N'AUDELIVERY' ,[Name] = N'Ekart AU Delivery',[Notes]= N'EKart' 
     where ShippingTypeId=50

Upvotes: 1

Fahmi
Fahmi

Reputation: 37473

Try below: it is not possible to update like insert statement

update refShippingTypes set [Code]='AUDELIVERY',[Name]='Ekart AU Delivery', 
 [Notes]='EKart' 
where ShippingTypeId=50

Upvotes: 1

Related Questions