SQL query for a carriage return in a string and ultimately removing carriage return

后端 未结 10 1533
-上瘾入骨i
-上瘾入骨i 2020-12-04 17:37

SQL query for a carriage return in a string and ultimately removing carriage return

I have some data in a table and there are some carriage returns in places where I

10条回答
  •  臣服心动
    2020-12-04 18:01

    this will be slow, but if it is a one time thing, try...

    select * from parameters where name like '%'+char(13)+'%' or name like '%'+char(10)+'%'
    

    Note that the ANSI SQL string concatenation operator is "||", so it may need to be:

    select * from parameters where name like '%' || char(13) || '%' or name like '%' || char(10) || '%'
    

提交回复
热议问题