Re: How to summarize recordset...Select Distinct alternative?
- From: "MP" <NoSpam@xxxxxxxxxx>
- Date: Tue, 13 Nov 2007 18:20:09 -0600
"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:ugzm2sjJIHA.5860@xxxxxxxxxxxxxxxxxxxxxxx
MP wrote:
Your options are limited with Jet. Shaped recordsets may be the answer,
but I've never used them and can only advise you to look them up in the
documentation.
This could be done with a single recordset, but I think I would go with
two recordsets:
1. Select FldFile,FldPage,FldItem,Count(*) As ItemCount
FROM ...
GROUP BY FldFile,FldPage,FldItem
You can loop through this one to using Filter to easily do the first
section of your report. You could increment some variables (or array
elements) during the loop to get the values for the Totals, or you could
close this recordset and open a second on the following sql:
2. Select FldItem,Count(*) As ItemCount
FROM ...
GROUP BY FldItem
You can loop through this one for your totals section
Thanks Bob,
I'll try these out
I'll have to read up on Group By
to see how that differs from Order By in terms of filtering returned rows
and Count(*) As ItemCount
and Filter...? "You can loop through this one to using Filter to easily do
the first..."
yet another keyword?
will set up a test function to see how that will work as far as reading back
the records
Thanks again,
Mark
.
- Follow-Ups:
- Re: How to summarize recordset...Select Distinct alternative?
- From: Bob Barrows [MVP]
- Re: How to summarize recordset...Select Distinct alternative?
- References:
- How to summarize recordset...Select Distinct alternative?
- From: MP
- Re: How to summarize recordset...Select Distinct alternative?
- From: Bob Barrows [MVP]
- Re: How to summarize recordset...Select Distinct alternative?
- From: MP
- Re: How to summarize recordset...Select Distinct alternative?
- From: Bob Barrows [MVP]
- How to summarize recordset...Select Distinct alternative?
- Prev by Date: Re: Best Practices for DataAccess Layer in VB6
- Next by Date: Re: How to summarize recordset...Select Distinct alternative?
- Previous by thread: Re: How to summarize recordset...Select Distinct alternative?
- Next by thread: Re: How to summarize recordset...Select Distinct alternative?
- Index(es):
Relevant Pages
|
|