Reputation: 297
In table A
-> Column X
there is some data which has numbers, alphabets and special characters. Most of the records has single line of data but some of them has 2 or 3 lines of data.
1 this is a sample description of data 01/11/2017 @ 123'~
Records with two lines of data
1 this is a sample description
2 of data 22/11/2017 @~ 12@#'
I need to do a select query to get the records which has 2 lines of data in Column X of table A.
I use TOAD
and the above mentioned sample data is from the Grid popup editor
thanks
Upvotes: 1
Views: 869
Reputation: 35154
You could select those rows that contain a new line (do not know your sample data, either chr(10)
or chr(13)
):
select *
from tableA
where instr(columnX, chr(10)) > 0;
The solution is taken from this SO answer, please do not forget to upvote the linked solution if it helped you.
Upvotes: 2