Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Problem with 'like' compare
Hi,
I have a table with a VARCHAR2 field (Oracle 9i), and I'm trying to do a SELECT using a "where ... like ...", and am having a problem.
The field (myfield) in the records in the table contain a bunch of text, and in the middle, there's something like:
"....SerialNumber: [0a]..."
"....SerialNumber: [0b]..."
etc.
My SELECT looks something like:
SELECT * from mytablename where lower(myfield) like lower('%serialnumber: [ 0a]%')
is returning no rows.
If I change the SELECT to:
SELECT * from mytablename where lower(myfield) like lower('%serialnumber:%')
the query does return rows (too many of them!!).
Can someone tell me what is wrong with this?
Thanks,
Jim
Received on Sat Jul 24 2004 - 12:42:50 CDT
![]() |
![]() |