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

Home -> Community -> Usenet -> c.d.o.server -> Help. How to search for text with a CASE WHEN cmd?

Help. How to search for text with a CASE WHEN cmd?

From: Greg <esabens_at_yahoo.com>
Date: 30 Mar 2006 07:00:51 -0800
Message-ID: <1143730851.906778.86500@v46g2000cwv.googlegroups.com>


I need to a way to search for a specific word within a field using a CASE WHEN command within the SELECT section of an SQL query. For example, let's say the field looks like:

'234234-Greg-325123616-1341436-234324-43-Don-235161436-2436-2346-435'

What I need to be able to do is have a CASE WHEN command that would work something like this:

case when (x.field contains 'Greg' and x.field contains 'Don') then 1 else 0

What command is there that can be used in place of the hypothetical
'contains' command that I used in the above example?

Thanks. Received on Thu Mar 30 2006 - 09:00:51 CST

Original text of this message

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