Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Datastore question

2 posts in DataWindow Last posting was on 2008-11-21 04:14:28.0Z
Mark Pare Posted on 2008-11-21 02:35:57.0Z
Sender: 6323.492618f0.1804289383@sybase.com
From: Mark Pare
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Datastore question
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49261e8d.637b.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 20 Nov 2008 18:35:57 -0800
X-Trace: forums-1-dub 1227234957 10.22.241.41 (20 Nov 2008 18:35:57 -0800)
X-Original-Trace: 20 Nov 2008 18:35:57 -0800, 10.22.241.41
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88213
Article PK: 417467

HI, I have a datastore with the following columns:

player_id league_id season_id team_id rs_gp rs_g rs_a
--------- --------- --------- ------- ----- ---- ----
1 1 1 1 82 45 71
1 1 2 1 26 12 18
1 1 2 2 56 30 25
1 1 3 2 80 37 50
1 1 4 2 81 42 38


I want to take this and sum up by player_id, league_id and
season_id for a total so the above looks like:

player_id league_id season_id rs_gp rs_g rs_a
--------- --------- --------- ----- ---- ----
1 1 1 82 45 71
1 1 2 82 42 43
1 1 3 80 37 50
1 1 4 81 42 38

does anyone know how to do this quickly with dot notation or
something else like that?

Any help would be greatly appreciated - thanks


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2008-11-21 04:14:28.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49261e8d.637b.1681692777@sybase.com>
Subject: Re: Datastore question
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <492635a4$1@forums-1-dub>
Date: 20 Nov 2008 20:14:28 -0800
X-Trace: forums-1-dub 1227240868 10.22.241.152 (20 Nov 2008 20:14:28 -0800)
X-Original-Trace: 20 Nov 2008 20:14:28 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88214
Article PK: 417468

Group (and sort) by player_id, league_id, season_id and put a sum() in the
group trailer. Give the computed field a name.
You can access it by using any row in the group, and use FindGroupChange to
locate the row breaks.
Or do the group and sum in the SQL ;-)

<Mark Pare> wrote in message news:49261e8d.637b.1681692777@sybase.com...
> HI, I have a datastore with the following columns:
>
> player_id league_id season_id team_id rs_gp rs_g rs_a
> --------- --------- --------- ------- ----- ---- ----
> 1 1 1 1 82 45 71
> 1 1 2 1 26 12 18
> 1 1 2 2 56 30 25
> 1 1 3 2 80 37 50
> 1 1 4 2 81 42 38
>
>
> I want to take this and sum up by player_id, league_id and
> season_id for a total so the above looks like:
>
> player_id league_id season_id rs_gp rs_g rs_a
> --------- --------- --------- ----- ---- ----
> 1 1 1 82 45 71
> 1 1 2 82 42 43
> 1 1 3 80 37 50
> 1 1 4 81 42 38
>
> does anyone know how to do this quickly with dot notation or
> something else like that?
>
> Any help would be greatly appreciated - thanks