Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: LIKE clause
"Robert Scheer" <rbscheer_at_my-deja.com> wrote in message
news:1153171657.974800.238020_at_s13g2000cwa.googlegroups.com...
> Hi.
>
> I have a query that uses the Like clause like that (only relevant
> code):
>
> ...
> and fl.status like (case when param1 = 1 then '%NBH%'
> when param1 = 2 then '%SVH%'
> when param1 = 3 then '%H%' end)
> ...
>
> In fact, I would like the above SQL to show all records, if my
> parameter is 3. I could not find how to do that, so I used a letter
> that is common to all my values. Is this the correct way to do that?
>
> Regards,
> Robert Scheer
>
Try: like '%'
Robbert Received on Mon Jul 17 2006 - 16:28:43 CDT