Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sums & Counts (2003)

    I have a table where I need:
    the count of distinct FieldA
    the count of distinct FieldB
    the Sum of FieldC
    the Sum of FieldD
    the Sum of FieldE

    Possible in a single query? If not, what is the easiest NON-VBA method?

    Thanks!
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sums & Counts (2003)

    You could create a Totals query, obtain the sum of FieldC etc. the usual way, and use the DCountDistinct function from <post:=286,858>post 286,858</post:> to get the distinct count of FieldA and FieldB (set the Total option for these to Expression).

    Otherwise, you'd have to create several queries to accomplish what you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •