Search code examples
sqloracle-databaseselectnewlinelike-keyword

Searching for newlines in a Oracle DB using SQL 'like' clause


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!


Solution

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