Re: aggregation
From: JG (JG_at_discussions.microsoft.com)
Date: 09/20/04
- Next message: CK: "Re: Audit Trail"
- Previous message: Michel Walsh: "Re: Scelta fra due opzioni"
- In reply to: StCyrM: "Re: aggregation"
- Next in thread: Lynn Trapp: "Re: aggregation"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 20 Sep 2004 06:21:05 -0700
Thank you for your prompt responses.
I have tried what you suggest. The problem is that I have many columns that
I also want included in the results, but I don't want to group by them. I
want my resultant rows, with the sums in the dollar column, and for the
miscellaneous columns i need to take only the first occurrence to represent,
for instance, all of Tod's rows.
Did I explain this well?
Here's another example. If I started with:
COMPANY DESCR. COUNTRY SALES (Millions)
GenTech a new tech company Australia 10
BDC -------------- ------ --
GenTech tech comp. Canada 12
Keith's -------------- ------ --
Pansing -------------- ------ --
GenTech computers/AV US 18
Then I would like to eliminate the repetitions by summing in the sales
column and taking the "descr." and "country" data from the first row
encountered:
COMPANY DESCR. COUNTRY SALES (Millions)
GenTech a new tech company Australia 40
BDC -------------- ------ --
Keith's -------------- ------ --
Pansing -------------- ------ --
Maybe that's an easier way to show what i need to do?
The only way I've found so far is to use the "group by" and "sum" method,
but i can't do this and keep the rest of the columns ..
Thanks so much,
JG
"StCyrM" wrote:
> Good afternoon
>
> In your query design, simply GroupBy the Name and Sum on the Owes column
>
> Best regards
>
> Maurice St-Cyr
> Micro Systems Consultants, Inc.
>
> >i am open to doing this through query building or code, but don't have any
> >idea how. can someone point me in the right direction? i can't get it to work
> >
> >with queries.
> >
> >thanks,
> >jg
> >
> >
> >
> >
> >
> >
>
>
>
- Next message: CK: "Re: Audit Trail"
- Previous message: Michel Walsh: "Re: Scelta fra due opzioni"
- In reply to: StCyrM: "Re: aggregation"
- Next in thread: Lynn Trapp: "Re: aggregation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|