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 -> LIKE clause

LIKE clause

From: Robert Scheer <rbscheer_at_my-deja.com>
Date: 17 Jul 2006 14:27:38 -0700
Message-ID: <1153171657.974800.238020@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 Received on Mon Jul 17 2006 - 16:27:38 CDT

Original text of this message

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