SQL joins ?
From: Peter Gross <peter_at_gate.bton-health.sthames.nhs.uk>
Date: 1996/01/09
Message-ID: <4ctju7$tc_at_gate.bton-health.sthames.nhs.uk>#1/1
group by file_id, tablespace_name
order by 3 asc, 1 asc, 5 desc
/
Date: 1996/01/09
Message-ID: <4ctju7$tc_at_gate.bton-health.sthames.nhs.uk>#1/1
I am using the following script that provides with the right output, but not in the format I would like :-(
select file_id, file_name, tablespace_name, bytes
, 'Total' status
from dba_data_files
union
select file_id, ' ' file_name , tablespace_name, sum(bytes), 'Free' statusfrom dba_free_space
group by file_id, tablespace_name
order by 3 asc, 1 asc, 5 desc
/
#-------------------
This gives the following output:
ID FILE-NAME TABLE-SPACE BYTES STATUS
--- ---------------------- ----------- ---------- ------ 1 /usr4/business_1.dbs BUSINESS 52428800 Total 1 BUSINESS 39792640 Free
What I would like is:
ID FILE-NAME TABLE-SPACE TOTAL FREE
--- ---------------------- ----------- ---------- ---------- 1 /usr4/business_1.dbs BUSINESS 52428800 39792640
Any ideas on how I should go about this folks ?
Thanks in advance,
Peter Gross.
-- The ideas, suggestions, jokes, cautions, complaints, comments, scripts, insults, critiscms, observations, diagrams, sarcastic remarks, stories, programs, and thoughts shown in the text above are mine and mine alone, and are NOT those of my employer or anyone else for that matter (unless I say otherwise ;-)Received on Tue Jan 09 1996 - 00:00:00 CET