How to remove carriage returns and new lines in Postgresql?

前端 未结 4 744
太阳男子
太阳男子 2020-12-07 17:41

All,

I am stuck again trying to get my data in a format that I need it in. I have a text field that looks like this.

\"deangelo 001 deangelo

4条回答
  •  忘掉有多难
    2020-12-07 18:04

    select regexp_replace(field, E'[\\n\\r]+', ' ', 'g' )
    

    read the manual http://www.postgresql.org/docs/current/static/functions-matching.html

提交回复
热议问题