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: Help! What is wrong with this query

Re: Help! What is wrong with this query

From: Gaetan Poitras <poitrasg_at_crcsogema.com>
Date: 26 Mar 2002 11:58:31 -0800
Message-ID: <3ebc2be2.0203261158.438a11b1@posting.google.com>


sjoshi_at_ingr.com (Sunit Joshi) wrote in message news:<8f8ffe67.0203260707.53018305_at_posting.google.com>...
> Hello
> I can't seem to get correct values for some of the tablespace with this query.
>
> select o.tablespace_name, round(sum(o.bytes/(1024 * 1024)),2) "Total(MB)",
> round(sum(u.bytes/(1024 *1024)),2) "FreeMB"
> from dba_data_files o, dba_free_space u
> where o.tablespace_name = u.tablespace_name
> group by o.tablespace_name;
>
> thanks
> Sunit

try:

select o.tablespace_name, round(sum(o.bytes/1024/1024),2) "Total(MB)", round(sum(u.bytes/1024/1024),2) "FreeMB" from dba_data_files o, dba_free_space u
where o.tablespace_name = u.tablespace_name group by o.tablespace_name; Received on Tue Mar 26 2002 - 13:58:31 CST

Original text of this message

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