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

Home -> Community -> Usenet -> c.d.o.tools -> Like Predicate and Sub-Query

Like Predicate and Sub-Query

From: Siclaro <siclaro_at_dfw.net>
Date: 2000/06/02
Message-ID: <39386BFA.B416F8C8@dfw.net>#1/1

Hello

I am wondering if a subquery can feed the LIKE predicate in a where clause. I'll give an example:

Let say I have a query:
select name from table where name like 'JOHN%;

but I want the value for the like to be a return value of a sub-select, as in

Select name from table where name like (select name || '%' from table where empid = 12345);

Can this be done in Oracle 7.3.3? It seems like I have done this before but cannot get it to work. Any suggestions would be helpful.

Thanks
Siclaro Received on Fri Jun 02 2000 - 00:00:00 CDT

Original text of this message

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