Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query of a query

Status
Not open for further replies.

jpaulino

Programmer
May 28, 2002
26
0
0
DE
Hi all,

I want to do a query of a query of a query. Any help ?

Tanks
 
something like this?

Code:
select a.col1, a.col2, a.col5
from
( 
select z.col1, z.col2, z.col3, z.col4, z.col5
from (
      select * from leTable
      ) z
) a

There are numerous ways to do what you're trying to do, but you need to be a tad more specific. Some things that might be helpful include:

1. Database you're using
2. What your data looks like
3. What desired output would be from the query, the query of a query, and the query of a query of a query.

Good Luck,

Alex

Ignorance of certain subjects is a great part of wisdom
 

You also may want to check .Filter of a recordset.



Have fun.

---- Andy
 

Have a look into "CREATE VIEW" (or "CREATE PROCEEDURE", if tables get updated).

Then you can create 2 Views and then, for the recordset, base your Sql LEFT JOIN statment off of the two Views.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top