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: VAR : does anybody have a clue?

Re: VAR : does anybody have a clue?

From: Gerd Kock <info_at_gerd-kock.de>
Date: Fri, 12 Nov 1999 22:12:43 GMT
Message-ID: <382c907d.23356249@news.btx.dtag.de>


try

select sum(bytes)
INTO :x
from v$sgastat;

SELECT name, bytes, bytes/:x FROM v$sgastat;

shoul work, if not, look at the manual

Gerd

On Fri, 12 Nov 1999 21:50:17 GMT, kal121_at_yahoo.com wrote:

>This is what I am trying to do:
>
>SQL> var x number -- declare a variable named x
>
>Now, what I want to do is assign:
>select sum(bytes) from v$sgastat INTO x
>
>to be used as follows:
>
>SELECT name, bytes, bytes/x FROM v$sgastat;
>
>bytes/x would give me the percent of the sga devoted to that particular
>sga component in the third column.
>
>Does anybody know the CORRECT way to do this?
>
>Thanks
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Fri Nov 12 1999 - 16:12:43 CST

Original text of this message

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