Wednesday, June 10, 2009

how to replace extra space in a database/sql column

use the replace function:

update table_name
set column_name = replace(column_name, ' ', ' ');

the function takes the column name and replaces two occurrences of spaes with one;

No comments: