(anonymous) wrote: > how can I remove a set of characters in text-columns ? > Say I'd like to remove { } ( ) ' " , ; . : ! > Of course I can chain replace ( replace ( replace ( replace > ( ... , '' ) .... and replace the chars one by one against > an empty string ''.
> There might be a more elegant way. > Is there ? Besides the regexp_replace() solution mentioned by Charlie and Steve, you can also use TRANSLATE(): | tim=# SELECT TRANSLATE('a{b''c"d!f', '{}()''",;.:!', ''); | translate | ----------- | abcdf | (1 Zeile) | tim=# Tim -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql