Searching for newlines in a Oracle DB using SQL 'like' clause
-
28-09-2019 - |
Question
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.
OTHER TIPS
select * from yourTable where InStr(yourCol, Chr(10))>0
would work
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow