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.

summing different that group

5 posts in DataWindow Last posting was on 2008-12-23 07:49:21.0Z
orit.shaked Posted on 2008-12-22 10:25:59.0Z
From: orit.shaked@gmail.com
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: summing different that group
Date: Mon, 22 Dec 2008 02:25:59 -0800 (PST)
Organization: http://groups.google.com
Lines: 43
Message-ID: <597b0b87-85a0-4771-8e0c-64f489b60001@z6g2000pre.googlegroups.com>
NNTP-Posting-Host: 138.134.102.15
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1229941559 2550 127.0.0.1 (22 Dec 2008 10:25:59 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 22 Dec 2008 10:25:59 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: z6g2000pre.googlegroups.com; posting-host=138.134.102.15; posting-account=11YIRwoAAACBDMKBGTN0IGNVXCmDtTn9
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 proxy1.hai.iec.co.il:8081 (squid/2.5.STABLE1), 1.0 IWSS1:8080 (IWSS)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!z6g2000pre.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88463
Article PK: 417717

Hi

Do someone know easy way for sum (or other grouping data) for column
that have sum sub group which is not in the same order ... .
for example, a datawindow report for supllier bills order by bill date

Supplier: Google

date bill No amount currency
jan-1 986 100 USD
jan-3 987 200 USD
feb-2 995 350 EUR
.
.
Googles sum:
currency amount
EUR 350
USD 300

Supplier: Sybase

date bill No amount currency
jan-6 9 200 JPY
jan-9 987 350 USD
.
.
Sybase sum:
currency amount
JPY 200
USD 350

Reports total:

currency amount

EUR 350

JPY 200

USD 6000


Thanks


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-12-22 14:26:17.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.18 (Windows/20081105)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: summing different that group
References: <597b0b87-85a0-4771-8e0c-64f489b60001@z6g2000pre.googlegroups.com>
In-Reply-To: <597b0b87-85a0-4771-8e0c-64f489b60001@z6g2000pre.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <494fa389$1@forums-1-dub>
Date: 22 Dec 2008 06:26:17 -0800
X-Trace: forums-1-dub 1229955977 10.22.241.152 (22 Dec 2008 06:26:17 -0800)
X-Original-Trace: 22 Dec 2008 06:26:17 -0800, vip152.sybase.com
Lines: 53
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88464
Article PK: 417719

If the values (and the number of values) are known at design-time, then
you can use a series of if() statements:
sum ( if ( currency = 'USE' , amount , 0 )

If not, then you'll have to use a second datawindow for the currency
totals and put that with your original one in a composite datawindow.

orit.shaked@gmail.com wrote:
> Hi
>
> Do someone know easy way for sum (or other grouping data) for column
> that have sum sub group which is not in the same order ... .
> for example, a datawindow report for supllier bills order by bill date
>
> Supplier: Google
>
> date bill No amount currency
> jan-1 986 100 USD
> jan-3 987 200 USD
> feb-2 995 350 EUR
> .
> .
> Googles sum:
> currency amount
> EUR 350
> USD 300
>
> Supplier: Sybase
>
> date bill No amount currency
> jan-6 9 200 JPY
> jan-9 987 350 USD
> .
> .
> Sybase sum:
> currency amount
> JPY 200
> USD 350
>
> Reports total:
>
> currency amount
>
> EUR 350
>
> JPY 200
>
> USD 6000
>
>
> Thanks


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2008-12-22 14:29:05.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <597b0b87-85a0-4771-8e0c-64f489b60001@z6g2000pre.googlegroups.com> <494fa389$1@forums-1-dub>
Subject: Re: summing different that group
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
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: <494fa431$1@forums-1-dub>
Date: 22 Dec 2008 06:29:05 -0800
X-Trace: forums-1-dub 1229956145 10.22.241.152 (22 Dec 2008 06:29:05 -0800)
X-Original-Trace: 22 Dec 2008 06:29:05 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88465
Article PK: 417718

That looks like a crosstab to me.

"Jason 'Bug' Fenter [TeamSybase]"

<NO_SPAMMING_jason.fenter_@_teamsybase.com> wrote in message
news:494fa389$1@forums-1-dub...
> If the values (and the number of values) are known at design-time, then
> you can use a series of if() statements:
> sum ( if ( currency = 'USE' , amount , 0 )
>
> If not, then you'll have to use a second datawindow for the currency
> totals and put that with your original one in a composite datawindow.
>
>
>
> orit.shaked@gmail.com wrote:
>> Hi
>>
>> Do someone know easy way for sum (or other grouping data) for column
>> that have sum sub group which is not in the same order ... .
>> for example, a datawindow report for supllier bills order by bill date
>>
>> Supplier: Google
>>
>> date bill No amount currency
>> jan-1 986 100 USD
>> jan-3 987 200 USD
>> feb-2 995 350 EUR
>> .
>> .
>> Googles sum:
>> currency amount
>> EUR 350
>> USD 300
>>
>> Supplier: Sybase
>>
>> date bill No amount currency
>> jan-6 9 200 JPY
>> jan-9 987 350 USD
>> .
>> .
>> Sybase sum:
>> currency amount
>> JPY 200
>> USD 350
>>
>> Reports total:
>> currency amount
>> EUR 350
>> JPY 200
>> USD 6000
>>
>>
>> Thanks


orit.shaked Posted on 2008-12-23 07:49:21.0Z
From: orit.shaked@gmail.com
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: summing different that group
Date: Mon, 22 Dec 2008 23:49:21 -0800 (PST)
Organization: http://groups.google.com
Lines: 46
Message-ID: <c394ee53-0b5c-4b6a-ac15-7ecbd94fc54f@w1g2000prk.googlegroups.com>
References: <597b0b87-85a0-4771-8e0c-64f489b60001@z6g2000pre.googlegroups.com> <494fa389$1@forums-1-dub> <494fa431$1@forums-1-dub>
NNTP-Posting-Host: 138.134.102.15
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
X-Trace: posting.google.com 1230018561 31414 127.0.0.1 (23 Dec 2008 07:49:21 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 23 Dec 2008 07:49:21 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: w1g2000prk.googlegroups.com; posting-host=138.134.102.15; posting-account=11YIRwoAAACBDMKBGTN0IGNVXCmDtTn9
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 proxy1.hai.iec.co.il:8081 (squid/2.5.STABLE1), 1.0 IWSS1:8080 (IWSS)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news2!postnews.google.com!w1g2000prk.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88467
Article PK: 417721

On 22 דצמבר, 16:29, "Jerry Siegel [TeamSybase]"

<jNOsSPAMsiegel@yahoo!.com> wrote:
> That looks like a crosstab to me.
>
> "Jason 'Bug' Fenter [TeamSybase]"<NO_SPAMMING_jason.fenter_@_teamsybase.com> wrote in message
>
> news:494fa389$1@forums-1-dub...
>
>
>
> > If the values (and the number of values) are known at design-time, then
> > you can use a series of if() statements:
> > sum ( if ( currency = 'USE' , amount , 0 )
>
> > If not, then you'll have to use a second datawindow for the currency
> > totals and put that with your original one in a composite datawindow.
>
> > orit.sha...@gmail.com wrote:
> >> Hi
>
> >> Do someone know easy way for sum (or other grouping data) for column
> >> that have sum sub group which is not in the same order ... .
> >> for example, a datawindow report for supllier bills order by bill date
>
> >> Supplier: Google
>
> >> date      bill No    amount   currency
> >> jan-1     986        100         USD
> >> jan-3     987        200         USD
> >> feb-2     995        350         EUR
> >> .
> >> .
> >>            Googles sum:
> >>                       currency        amount
> >>                       EUR              350
> >>                       USD              300
>
> >> Supplier: Sybase
>
> >> date      bill No    amount   currency
> >> jan-6     9           200         JPY
> >> jan-9    987        350         USD
> >> .
> >> .
> >>            Sybase sum:
> >>                       currency        amount
> >>                       JPY               200
> >>                       USD              350
>
> >>                                                    Reports total:
> >>  currency        amount
> >>  EUR              350
> >>  JPY               200
> >>  USD              6000
>
> >> Thanks-הסתר טקסט מצוטט-
>
> -הראה טקסט מצוטט-

Thank you all

Due to crosstab format restriction it is not possible to use
crosstab . in this case
Although it look like I know the amount of sums, I can't be sure that
in the future there will not be another . and we will get wrong
results ...
this will leave me the only option of use composite DW (and I dont
like this option (.

... and if I'll use composite, what do you think will be right way,
getting the data twice from DB (for thae main and nested DW) or use
external DW sum/calculate the data from the main DW?

thanks again


Jeremy Lakeman Posted on 2008-12-22 14:27:59.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: summing different that group
Date: Mon, 22 Dec 2008 06:27:59 -0800 (PST)
Organization: http://groups.google.com
Lines: 21
Message-ID: <9de86009-006f-4a6e-855d-c6fcd659cba6@p2g2000prn.googlegroups.com>
References: <597b0b87-85a0-4771-8e0c-64f489b60001@z6g2000pre.googlegroups.com>
NNTP-Posting-Host: 122.49.134.3
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: base64
X-Trace: posting.google.com 1229956079 2556 127.0.0.1 (22 Dec 2008 14:27:59 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 22 Dec 2008 14:27:59 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p2g2000prn.googlegroups.com; posting-host=122.49.134.3; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!p2g2000prn.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88466
Article PK: 417720


On Dec 22, 8:25 pm, orit.sha...@gmail.com wrote:
> Hi
>
> Do someone know easy way for sum (or other grouping data) for column
> that have sum sub group which is not in the same order ... .
> for example, a datawindow report for supllier bills order by bill date
>
> Supplier: Google
>
> date      bill No    amount   currency
> jan-1     986        100         USD
> jan-3     987        200         USD
> feb-2     995        350         EUR
> .
> .
>            Googles sum:
>                       currency        amount
>                       EUR              350
>                       USD              300
>
> Supplier: Sybase
>
> date      bill No    amount   currency
> jan-6     9           200         JPY
> jan-9    987        350         USD
> .
> .
>            Sybase sum:
>                       currency        amount
>                       JPY               200
>                       USD              350
>
>                                                    Reports total:
>
> currency        amount
>
> EUR              350
>
> JPY               200
>
> USD              6000
>
> Thanks

sum(if( <column> = "value", <amount_col>, 0))