3

Trying to remove a non-breaking space from a field without any success. I've tried

execute <<-SQL
  UPDATE customers
  SET name = TRIM (name)
SQL

but this removes only spaces. It's similar question as this but I need it for Postgres (Postgres complains syntax error at or near "x00A0") and also I need only trimming i.e it has to remove only at the beginning and at the end of the text.

Thanks

Kote
  • 683
  • 1
  • 9
  • 27

1 Answers1

13

You can pass the character as the second argument of trim():

update customers
set name = trim(name, chr(160))
klin
  • 112,967
  • 15
  • 204
  • 232