Board index » delphi » Querying a Query

Querying a Query

I want to query some tables using a TQuery, and then query the resulting
data set using another TQuery. How do I do this? The dataset from the first
TQuery will not have a table name that I can use in the SQL statment for
the second TQuery.

Neil McCrossin
Brisbane, Australia
n...@gil.com.au

 

Re:Querying a Query


Use the BatchMove component to save the result set from the first
query to a table.

Bill

(Sorry but TeamB cannot answer support questions received via email.)
(To send me email for any other reason remove .nospam from my address.)

Re:Querying a Query


Quote
>I want to query some tables using a TQuery, and then query the resulting
>data set using another TQuery. How do I do this?

You can save the result of the first query to a table using
DbiMakePerminate.

 DbiMakePermanent(query1.handle, 'temp.db',true);
--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Re:Querying a Query


Brian Bushay TeamB <BBus...@DataGuidance.com> wrote in article
<34c6ffa5.82751...@forums.borland.com>...

Quote

> >I want to query some tables using a TQuery, and then query the resulting
> >data set using another TQuery. How do I do this?

> You can save the result of the first query to a table using
> DbiMakePerminate.

>  DbiMakePermanent(query1.handle, 'temp.db',true);
> --
> Brian Bushay (TeamB)
> Bbus...@DataGuidance.com

But isn't there some way of doing it all in memory?

Neil McCrossin
n...@gil.com.au

Re:Querying a Query


Quote
>But isn't there some way of doing it all in memory?

No not from a query that has already been run.
32bit BDE does support sub queries so you may be able to do it that
way

--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Other Threads