Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove whitespace from a Columns values

Status
Not open for further replies.

d4n0

Programmer
Jun 26, 2003
9
GB
Hi,

I need to remove whitespace from all the values in a certain column in a table.

I want to do something like:

update myTable
set colName = trim(colName)

but that's not doing the trick. Any suggestions?

Cheers,

Dan.
 
UPDATE table_name set column_name = REPLACE(column_name, ' ', '')


replaces the first quoted with the 2nd quoted e.g a space with nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top