DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: SQL plus

  1. #1
    Join Date
    Jan 2002
    Posts
    474
    HI all,

    If I have this statement
    SPOOL C:\SPACE_USAGE\tablespace_usage.txt

    select f.tablespace_name,a.total,u.used,f.free,round((u.used/a.total)*100) "% used",round((f.free/a.total)*100) "% Free" from
    (select tablespace_name, sum(bytes/(1024*1024)) total from dba_data_files group by tablespace_name) a,
    (select tablespace_name, round(sum(bytes/(1024*1024))) used from dba_extents group by tablespace_name) u,
    (select tablespace_name, round(sum(bytes/(1024*1024))) free from dba_free_space group by tablespace_name) f
    WHERE a.tablespace_name = f.tablespace_name
    and a.tablespace_name = u.tablespace_name;


    so I got the result, what SQL plus command for me to take out the SQL statment on my output ???

    Thanks


  2. #2
    Join Date
    Jan 2001
    Posts
    3,134
    Can't you just open the .txt and delete it?

    Another option is to run the query, then turn on spooling, then just use the
    SQL>/

    but you will still have to manually delete the first line since it will print
    SQL>/

    MH
    I remember when this place was cool.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width