Home » SQL & PL/SQL » SQL & PL/SQL » sum function
sum function [message #20926] Tue, 02 July 2002 03:07 Go to next message
Raju
Messages: 74
Registered: March 1999
Member
Hi,

With the following query Iam getting the result wrong
Pl. correct the query

Select
sum(aovalue),sum(netvalue),sum(taxedaovalue) gross,sum(taxedprvalue) gross1
From SaAo0 a,SaAo1 b
Where a.compcode=b.compcode
and a.compcode='02'
and a.branchcd=b.branchcd
and a.seriescd=b.seriescd
and a.aono=b.aono
And b.BranchCd = 'A1' And b.SeriesCd in ('AO','A2E')
and aostatus<>'C'
and aodt between to_date('01-JUN-2002','dd-mon-RRRR')
and to_date('30-JUN-2002','dd-mon-RRRR')

SUM(AOVALUE) SUM(NETVALUE) GROSS GROSS1
------------ ------------- --------- ---------
13290571 3820424.6 13515866 3885348.4

I want the Ist & IInd values same and IIIrd & IVth values same.

Regards,
Raju.
Re: urgent .. sum function [message #20958 is a reply to message #20926] Tue, 02 July 2002 21:09 Go to previous message
Raju
Messages: 74
Registered: March 1999
Member
Pl. correct the query. Urgent.
Previous Topic: decode
Next Topic: How I know if exists statistics from a table ?
Goto Forum:
  


Current Time: Fri May 03 23:58:08 CDT 2024