newline characters data( either chr(10) or chr(13))
840912Jun 7 2011 — edited Feb 19 2012I have 2 columns in a table and these columns have newline characters data( either chr(10) or chr(13)).
Now I need to fetch data so that all the records which have new line character( either chr(10) or chr(13) ) in any of these 2 columns should be retrieved.
create table sri_newchar (name varchar2(100))
insert into sri_newchar values('Sri'||chr(10)||'Ram'||chr(13)||'Kumar')
insert into sri_newchar values('Sri'||chr(13))
insert into sri_newchar values('RajeshMishra')
insert into sri_newchar values('Sri'||chr(10)||'Raj'||chr(13)||'Kapoor')
insert into sri_newchar values('Sri'||chr(13))
insert into sri_newchar values('Vinod'||Chr(10)||'Shimla')
insert into sri_newchar values('Rajkumar'||Chr(10)||'Goyal')
I have return query like
select * from sri_newchar where name like '%'||CHR(10) ||'%'
any other way to write this query
Please help me with a correct query for this task.