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

Home -> Community -> Usenet -> c.d.o.server -> Re: 'Carriage Return' in spool file

Re: 'Carriage Return' in spool file

From: <rtproffitt_at_my-deja.com>
Date: Wed, 30 Jun 1999 16:24:56 GMT
Message-ID: <7ldgca$ip0$1@nnrp1.deja.com>


Youu can also control the carriage from the SELECT statement, by using CHR(10). For example, if you were writing dynamic sql you would write like this:

(This is a poor example because the select is so short, but just assume you wanted output on two lines:)

Desired result for all tables:

    select count(*)
    from TABLE;

The Select:

    Select 'Select count(*)' || chr(10) || ' from ' ||     TNAME || ';'
    from TAB
    Where TABTYPE='TABLE';

You might still need trimspool to get rid of whitespace, but you could control your text with this method.

Robert Proffitt
Beckman Coulter
RTProffittNOSPAM_at_Beckman.com

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Wed Jun 30 1999 - 11:24:56 CDT

Original text of this message

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