Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

newline characters data( either chr(10) or chr(13))

840912Jun 7 2011 — edited Feb 19 2012
I 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2012
Added on Jun 7 2011
3 comments
16,857 views