dbTalk Databases Forums  

MySQL update syntax

comp.databases comp.databases


Discuss MySQL update syntax in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Danny
 
Posts: n/a

Default MySQL update syntax - 12-23-2003 , 11:51 AM






Hi.

I'm getting an error when I try to run the following query in MySQL:

UPDATE gtbl_Direct
SET strCustomerID=Concat('D0', Right(strCustomerID,6))
WHERE Length(strCustomerID)=7;

What I'm trying to do is change existing 7 character values to 8
characters by adding a zero. E.g.,

From
D123456

To
D0123456

Can anyone tell me what is wrong with my update statement above?

Thanks.

Danny

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.