|
-
insert into test
select c.name, sysdate, a.tablespace_name, a.bytes, b.bytes
from
(select tablespace_name, sum(bytes) bytes from dba_data_files group by tablespace_name ) a,
(select tablespace_name, sum(bytes) bytes from dba_extents group by tablespace_name ) b,
v$database c
where a.tablespace_name = b.tablespace_name
----
I have simplified the query, but you should get the idea.
You have a couple of issues with your select:
1. you are using the "values" clause when you are not using any values.
2. you are trying to use "order by" with an insert query ( a no-no)
Jeff Hunter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|