3

I'm trying to see if a particular column in a table in my Oracle database has any strings which contain a newline character, so a wildcard, a newline, and another wildcard.

I've tried the like command and a combination with CHR(10) and tried escaping the newline itself, but to no avail. What would be the proper way to detect a newline in somewhere within a string?

Thanks!

awied
  • 2,698
  • 5
  • 33
  • 37

2 Answers2

13

like '%'||chr(10)||'%' ought to work.

Alex Poole
  • 183,384
  • 11
  • 179
  • 318
4

select * from yourTable where InStr(yourCol, Chr(10))>0 would work

jle
  • 9,316
  • 5
  • 48
  • 67