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: Totals for very few columns

Re: Totals for very few columns

From: <ccyr6798_at_my-deja.com>
Date: Wed, 15 Dec 1999 14:10:12 GMT
Message-ID: <8387g0$m7$1@nnrp1.deja.com>


how about a cursor like...

select cust_ID, sum(circuits) from table group by cust_id
order by cust_id

In article <8369ur$l28$1_at_nnrp1.deja.com>,   milesr_at_my-deja.com wrote:
> Hello, My name is Ronald.
>
> I'm currently running Oracle 8.5
>
> This is an abbreviated report format of my current database:
>
> Cust_id Location Circuits
> 159 FT. Bragg 42
> 159 FT. Bragg 5
> 159 FT. Bragg 1
>
> Now, if they have the same custid I'd like to add the circuits
> together so I'd only see one record per custid and the circuits number
> would represent the total number of circuits for that custid.
>
> For example:
>
> Cust_id Location Circuits
> 159 FT. Bragg 48
>
> Could someone tell me how to accomplish this task in PL/SQL. It
would
> be appreciated.
>
> Thanks,
> Ronald
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Dec 15 1999 - 08:10:12 CST

Original text of this message

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