Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: LIKE clause

Re: LIKE clause

From: Robbert van der Hoorn <removetheXinR.Xvanderhoorn_at_osait.nl>
Date: Mon, 17 Jul 2006 23:28:43 +0200
Message-ID: <44bc0239$0$31650$e4fe514c@news.xs4all.nl>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US