Board index » delphi » Is there a way to run a query against the result set another query
M Tuttle
![]() Delphi Developer |
Sat, 28 Sep 2002 03:00:00 GMT
|
M Tuttle
![]() Delphi Developer |
Sat, 28 Sep 2002 03:00:00 GMT
Is there a way to run a query against the result set another query
Greetings All,
Currently I have to query my database twice. One for the actual result set SQL.Add('Select count(*) from Employer E ' + Is there anyway to run a query that counts records against the first query Seems to me would be much faster than actually querying the same table Or better yet, why doesn't the RecordCount property of an IBQuery return the Any help would be appreciated. Thanks Mike |
Team
![]() Delphi Developer |
Sat, 28 Sep 2002 03:00:00 GMT
Re:Is there a way to run a query against the result set another queryNot really. With the BDE you can make a permanent table out of the result set, but in this case there isn't really an easy way to do this. As for record count, most SQL backends don't return record counts. With IBX, QuoteM Tuttle wrote: Jeff Overcash (TeamB) (Please do not email me directly unless asked. Thank You) Maybe it was infatuation or the thrill of the chase. Maybe you were always beyond my reach and my heart was playing safe. But was that love in your eye I saw or the reflection of mine? Give me time, won't you give me that time! Welcome back to the circus. (Fish) |
M Tuttl
![]() Delphi Developer |
Sat, 28 Sep 2002 03:00:00 GMT
Re:Is there a way to run a query against the result set another queryThanks Jeff, Will there be a penalty using fetchAll for: Thanks Mike "Jeff Overcash (TeamB)" <overc...@onramp.net> wrote in message Quote> Not really. With the BDE you can make a permanent table out of the result |
Marcelo Lopez Rui
![]() Delphi Developer |
Sat, 28 Sep 2002 03:00:00 GMT
Re:Is there a way to run a query against the result set another queryAn alterantive I use if I will be bringing the whole data into the client: put all the data into TClientDataSet. You get the record count, plus all the extra goodies (creating indexes on the dataset, using aggregates, persisting to and from disk, etc). Marcelo Lopez Ruiz QuoteM Tuttle <mi...@softtechks.com> wrote in message news:38f353cc@dnews... |
Team
![]() Delphi Developer |
Sat, 28 Sep 2002 03:00:00 GMT
Re:Is there a way to run a query against the result set another queryOnly a network penalty of pulling all the data local. Over dialup lines this could be costly, over normal networks much less so. Marcelo's suggestion of TClientDataset is also a good one, but has the exact QuoteM Tuttle wrote: Jeff Overcash (TeamB) (Please do not email me directly unless asked. Thank You) Maybe it was infatuation or the thrill of the chase. Maybe you were always beyond my reach and my heart was playing safe. But was that love in your eye I saw or the reflection of mine? Give me time, won't you give me that time! Welcome back to the circus. (Fish) |
M Tuttl
![]() Delphi Developer |
Sun, 29 Sep 2002 03:00:00 GMT
Re:Is there a way to run a query against the result set another queryThanks Marcelo and All who replied, Well if I would have given the full picture, I would have stated that I am For some reason I never even considered the RecordCount of the CDS. This is Thanks again for the pointer. Mike Quote> An alterantive I use if I will be bringing the whole data into the client: |
1. Querying a query result set
3. Problems running parametrized query with LIKE operator against SQL server nvarchar datatype
4. Running a query against a temporary table...
5. Queries against an in memory data set
6. How do you run a date range query in the BDE against a Paradox table
7. help: querying the results of a SQL Query...
8. Querying the results of a query