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!

escape sql

671312Oct 15 2010 — edited Oct 15 2010
I have a column in a table that is only one character and I want to pull the data out of that table that this column contains one of these letters CDFSLXAJ.
If I use IN instead of like it gives me the data I am looking for but I would like to use escape. This is my escape statement:
select distinct type from pr_all_line where type LIKE 'CDFSLXAJ\%' ESCAPE '\';
I get this error:
SQL Error: ORA-01425: escape character must be character string of length 1
01425. 00000 - "escape character must be character string of length 1"
*Cause: Given escape character for LIKE is not a character string of
length 1.
*Action: Change it to a character string of length 1.
the data that shouldcome back is C F J.
Any ideas what I am doing wrong in my statement?
Thanks.
This post has been answered by hm on Oct 15 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 12 2010
Added on Oct 15 2010
7 comments
326 views