Board index » delphi » Chaining TQueries: Querying Paradox TQuery result sets using another TQuery
Alan Aipperspac
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Chaining TQueries: Querying Paradox TQuery result sets using another TQuery
I need to query the result set of another tquery already opened. The tables
are paradox and must remain so. Here is the SQL for the 1st TQuery ( I'll call it "QryDrugCount"): SELECT DISTINCT organism, DrugAbbr, SUM(NCCLStotal) AS Total (I'll call the result set "DrugCount.db" even though it doesn't actually "DrugCount.db" looks like this: Organism DrugAbbr Total Now, I want to do another GROUP BY on the result (I'll call the 2nd Tquery SELECT DISTINCT Organism, MAX(Total) as Isolates This would give me the result: Organism Isolates That is, it would if I had a table called "DrugCount.db"! But, since it is I tried setting the data source property of "QryIsolateCount" to How do I use the result set of one tquery as the source for a 2nd Tquery |