Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with 'like' compare
Andy Hassall wrote:
>
> On Sat, 24 Jul 2004 13:42:50 -0400, ohaya <ohaya_at_cox.net> wrote:
>
> >there's something like:
> >
> >"....SerialNumber: [0a]..."
>
> No space after the [.
> >
> >My SELECT looks something like:
> >
> >SELECT * from mytablename where lower(myfield) like
> >lower('%serialnumber: [ 0a]%')
> ^
>
> A space after the [. They don't match.
>
Hi Andy,
I was trying to be careful when I typed my original post, but may've messed up, but the fields in the records have a space/blank after the colon and after the left brackets ("[ 0a]"), and in the WHERE in the SELECT that I'm using, I'm putting spaces/blanks in both those places, and am not getting any rows back.
What's puzzling is if I put a string up to and including the left bracket in the WHERE, the query returns information. It's only if I try to include the text/data past the "[" that the query fails.
Is it possible the lower() is messing up the "0a", or something like that? I've tried using upper() instead, but same problem.
Jim Received on Sat Jul 24 2004 - 13:13:30 CDT
![]() |
![]() |