Apr 3, 2006 #1 christophorus Technical User Joined Apr 3, 2006 Messages 9 Location US I am trying to replace the leading blank spaces in a character column with leading zeros. Ex: " 669025" to "00669025
I am trying to replace the leading blank spaces in a character column with leading zeros. Ex: " 669025" to "00669025
Apr 3, 2006 #2 TonyGroves Programmer Joined Aug 13, 2003 Messages 2,389 Location IE You could use either REPLACE or the TRIM and LPAD functions. Upvote 0 Downvote
Apr 4, 2006 Thread starter #3 christophorus Technical User Joined Apr 3, 2006 Messages 9 Location US Thanks! I used replace with update: mysql> update table_name set table_field = replace (table_field, ' ', '0'); Upvote 0 Downvote
Thanks! I used replace with update: mysql> update table_name set table_field = replace (table_field, ' ', '0');