* Don > 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 ))
The name of the substring function in mysql is SUBSTRING() or MID(), not SUBSTR(). It would be easier to use the REPLACE() function: UPDATE DocComms SET ItemHSCode = REPLACE(ItemHSCode,'.','') <URL: http://www.mysql.com/doc/en/String_functions.html > HTH, -- Roger --------------------------------------------------------------------- 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