Question : Remove leading space from MySQL entries

I would like to remove the leading spaces from a number entries in my tables. This seems like it would do the trick http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_ltrim but how can it parse through an entire table fixing all of the entries that have a leading space or two?

Answer : Remove leading space from MySQL entries

Sorry, I missed a quote in the concat...  here's SQL that works:

select
   concat('update mytable set ',
          GROUP_CONCAT(concat(column_name,' = LTRIM(',column_name,') ')),
          ';'
   )
FROM (      
   select
       1 as random_dimension,
       column_name
   from
       information_schema.columns
   where
       table_schema = 'my_database'
   and table_name = 'mytable'
) tab_cols
group by random_dimension
Random Solutions  
 
programming4us programming4us