escape sql
671312Oct 15 2010 — edited Oct 15 2010I 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.