Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: VAR : does anybody have a clue?
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