Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can someone simplify this query

Re: Can someone simplify this query

From: Sagaran <sagaran.kasturi_at_gmail.com>
Date: 8 Feb 2005 23:44:41 -0800
Message-ID: <1107935081.700740.49740@z14g2000cwz.googlegroups.com>


Use this query, this should work.

select a.officecode off1, a.acno_code acc1,

     sum(current_purchase_amount) over (partition by a.office_code, a.acno_code) as sum1,

     b.officecode off2, b.account_code acc2,
     sum(org_budget_amt) over (partition by b.account_code,
b.office_code) as sum3,
     sum(rev_budget_amt) over (partition by b.account_code,
b.office_code) as sum4
from bweb_assetpurchasetxndetails a, bweb_budgetmaster b where a.officecode (+) = b.officecode
and a.acno_code (+) = b.account_code; Received on Wed Feb 09 2005 - 01:44:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US