Board index » delphi » Query on a query

Query on a query

How do you do a query on a query?  I though I saw somewhere that you could
do this in Delphi, but I can't find where I saw this.  If anybody has any
ideas it would be greatly appreciated.

Aaron Chacncey
Safe Auto Ins Co


Re:Query on a query


Depending on your backend, you can use sub-queries within an SQL
statement.  Alternatively:

1.  If you're using a C/S database then either create atemporary table
or a view of your first query and then query that with a second query.

2. If you're using flatfiles (ie Paradox or dBase) then run your first
query, use the BDE call DbiMakePermanent and then query the table

Derek Davidson
Get a FREE copy of DK's Audit Components for Delphi from my web site:
Now Includes INFOPOWER Derived components and a demo

(Remove the x to EMail me :

Other Threads