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

Home -> Community -> Usenet -> c.d.o.tools -> SQL*Plus compute on calculated column

SQL*Plus compute on calculated column

From: hani <hanton32_at_hotmail.com>
Date: 26 Jun 2001 09:35:58 -0700
Message-ID: <8dc139d4.0106260835.4ece62c8@posting.google.com>

Personal Oracle 7 on win 95

I would like some advice on an alternative method to compute sum. I would like to do a compute sum on a calculated column but as I understand its not possible.

compute sum label "Total for Feed:" of "FRFT balance" "# Records" "WBal" on Feed
--

select
 decode
 (frft_ind,
 'FLMTG','===TRUST===',
 'BRKDP','===BROKER DEPOSITS===',

 frft_ind)                                           "FEED",
 f.product                                            "PRODUCT #",
 sum(os_balance)/100000                              "FRFT BALANCE",
 count(*)                                            "# RECORDS",
 sum(os_balance*tprate)/100000000                    "WBAL",
 sum(os_balance*tprate)/100000/sum(os_balance)/100 "RATE"
--

from
 frft f,
 frft_xref x,
 curr_product p
--

where
 f.frft_seq = x.frft_seq and
 f.product = x.frft_product
--

group by
 x.frft_ind,
 f.product
--

order by
 frft_ind
/

I would like to do add "wbal"/"frft balance" to the compute sum above ?

any suggestions ? Received on Tue Jun 26 2001 - 11:35:58 CDT

Original text of this message

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