Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> From Keyword not found where expected
Hi All,
here is my SQL:
Select a.tablespace_name, a.bytes, b.tablespace_name, b.bytes,
(round(a.bytes-b.bytes)/a.bytes)*100, 2), '990.90')
From
(Select tablespace_name, (sum(bytes), '999,999,999,999') bytes from
dba_data_files) a,
(Select tablespace_name, (sum(bytes), '999,999,999,999') bytes from
dba_free_space) b,
Where a.tablespace_name=b.tablespace_name
Order by a.tablespace_name
When I try to run this it gives me the error: ORA-00923: FROM keyword not found where expected
The code above was modified from the original:
Select a.tablespace_name "Tablespace Name", to_char(sum(a.bytes),'999,999,999,999')
allocated, to_char(sum(b.bytes),'999,999,999,999') free, to_char(round(((sum(a.bytes)-sum(b.bytes))/sum(a.bytes))*100,2),'990.90')pct_full
Because it gave me the error:
ORA-00937- not a single-group group function
So..are there any ideas as to what I need to do to correct either of these problems?
I am trying to give Free Tablespace statistics (Tablespace Name, Bytes Allocated, Bytes Free, and Percent Full) from the V$ tables dba_data_files and dba_free_space.
I am fairly new to SQL so I was happy to have come this far! Please respond to this email address: sboscarelli_at_kmg.com as it differs from my posting addy.
Thanks in advance. Received on Tue Nov 13 2001 - 15:28:25 CST
![]() |
![]() |