Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: From Keyword not found where expected

Re: From Keyword not found where expected

From: Alexei VORONOV <alexei_voronov_at_yahoo.com>
Date: Wed, 14 Nov 2001 10:04:14 -0000
Message-ID: <9stbu1$e15$1@wanadoo.fr>


There are too parenthesis like ')' in your select

"Skye" <skyeboscarelli_at_ou.edu> a écrit dans le message news: 61beb318.0111131328.3ee8ded3_at_posting.google.com...
> 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
> from dba_data_files a,dba_free_space b
> where a.tablespace_name=b.tablespace_name
> order by a.tablespace_name,
> ((sum(a.bytes)-sum(b.bytes))/sum(a.bytes)) desc
>
> 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 Wed Nov 14 2001 - 04:04:14 CST

Original text of this message

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