Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> LIKE clause
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