2

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
  • 623
  • 1
  • 9
  • 25

1 Answers1

9

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

update customers
set name = trim(name, chr(160))
klin
  • 99,138
  • 12
  • 177
  • 203