Use Results From a Select as the "From" for Another Select
- From: "RitaG" <RitaG@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 1 Apr 2005 10:09:03 -0800
Hi.
I have to use a long, complicated "Where" clause in a SQL statement and
thought it would be better to break it up into 2 Selects but am not sure of
how to do it.
I'll make my example really simple - I want to select TextData (defined as
an Image in the SQL table) from a table Where TextData like '%ABC%' AND not
like '%DEF%'
AND not like '%GHI%' AND not like '%JKL%' etc.
Basically the question is how to code a Select within another Select where
the 2nd Select uses the results from the 1st Select.
Here's what I tried which doesn't work (I broke each piece down and they
work separately but not together):
Select ProviderName from (Select ProviderName from Provider where
PPONetworkID like '%9')
where ProviderName like '%EDEL%'
Any suggrstions will be greatly appreciated.
Rita
.
- Follow-Ups:
- Re: Use Results From a Select as the "From" for Another Select
- From: Hugo Kornelis
- Re: Use Results From a Select as the "From" for Another Select
- Prev by Date: Query Help with IF stmt
- Next by Date: Re: Query Help with IF stmt
- Previous by thread: Query Help with IF stmt
- Next by thread: Re: Use Results From a Select as the "From" for Another Select
- Index(es):