,Syltrem <syltremspammenot_at_videotron.com> wrote:
: Yes I thought of this, but it would sum for all rows, not by tablespace.
: Thanks for the suggestion, and if I`ve got it completely wrong, pls explain!
: --
If I understand you correctly with Fred's example using
BREAK on tablespace ON REPORT
COMPUTE SUM LABEL "Total" of SIZE on tablespace REPORT
might be what you're looking for.
HTH Helen
: Syltrem
: "Fred" <noway_at_jose.com> a crit dans le message de news:
: 20020604135317795-0400_at_news.his.com...
:> In <EY6L8.2378$H67.13089_at_tor-nn1.netcom.ca> Syltrem wrote:
:> > I`m having trouble finding the best way (or any way at all) to get a
:> > sum by tablespace, for the column "bytes" in this query. If possible,
:>
:> Have you tried using COMPUTE SUM OF BYTES ON REPORT?
:>
:> > have the same query print the details (that`s what it does now), then
:> > the summary. Oracle forces me to add the bytes column to my group by,
:> > therefore I do not get a sum... I don't think it`s worth posting what
:> > I`ve tried so far. Can someone help me? Thanks!
:> >
:> > select substr(owner,1,6) "Owner", SUBSTR(tablespace_name,1,17)
:> > "Tablespace",
:> > substr(segment_type,1,2) "Ty", substr(segment_name,1,31)
:> > "Segment", decode(floor(bytes/1024/1024/5), 0, bytes/1024 ||
:> > 'K', ltrim(TO_CHAR(bytes/1024/1024,'9999.9')) || 'M')
:> > "Size", extents "# Ext", next_extent/1024 "ExtSzK" from dba_
:> > segments where segment_name like upper('&segment_name%') escape '\'
:> > and tablespace_name like upper('&tablespace_name%')
:> > group by owner, segment_name, segment_type, tablespace_name, bytes,
:> > extents, next_extent
:> > having extents >= 0&min_nb_of_extents
:> > and bytes >= 0&min_size_mb*1024*1024
:> > order by owner, segment_name, segment_type desc;
:> >
Received on Thu Jun 06 2002 - 06:17:48 CDT