Hi, 

substr() doesn't exist in MySQL. 
Use substring().

UPDATE DocComms SET ItemHSCode = concat(substring( ItemHSCode, 1, 4 ),
substring( ItemHSCode, 6, 2 ), substring( ItemHSCode, 9, 2 ))


On Tue, 2003-01-21 at 15:34, Don wrote:
> Hi,
> RESENT DFUE TO TYPO
> 
> I want to change a field in a table.  Currently the data is in theformat -->
> 4818.50.00
> I want to remove the decimal points so that it is like --> 48185000
> I tried the sql code below but am getting a syntax error.  Can someone
> please point out the error of my ways?
> 
> UPDATE DocComms SET ItemHSCode = concat(substr( ItemHSCode, 1, 4 ),
> substr( ItemHSCode, 6, 2 ), substr( ItemHSCode, 9, 2 ))
> 
> Thanks,
> Don
-- 
Diana Soares


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to