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: Generating Blank Lines in SQLPlus

Re: Generating Blank Lines in SQLPlus

From: Mediagrif <ivirnig_at_videotron.ca>
Date: Tue, 09 Jan 2001 20:26:36 -0500
Message-ID: <3A5BBA4C.476859C3@videotron.ca>

Hi,

You can define a dummy column and use it as an alias in your query:

column ln format a80 fold_after

spool test.sql
select 'alter user ' ln

        , '  ' || username ln -- 3 concatenated spaces indent
        ,' temporary tablespace temp;' ln
        ,'' ln  -- blank line. You may add here as much blank lines as you
wish.
from dba_users;

spool off
clear columns

This should produce the following test.sql file with 80 characters wide lines, assuming default Oracle users: SYS, SYSTEM and OUTLN:

alter user

   SYS
temporary tablespace temp;

alter user

   SYSTEM
temporary tablespace temp;

alter user

   OUTLN
temporary tablespace temp;

Regards,

Sybrand Bakker a écrit :

> prompt ''
>
> will do.
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
> "Kirk W. Conrad" <kwconrad_at_mdanderson.org> wrote in message
> news:93fho8$35n$1_at_oac2.hsc.uth.tmc.edu...
> > I'm trying to use SQLPlus to extract database information from dba_...
> > tables and create some scripts to run in unix using the spool statement.
 I
> > need to get some blank lines in the scripts. Is there any way to do a
 blank
> > line in SQLPlus? I can return a single line with "no rows selected" by
 using
> > select * from dual where 1=2. If I could just get the "no rows selected"
 to
> > not print I'd be okay. Basically, I need to do carraige return/line
 feeds.
> > Any ideas?
> >
> > Thanks.
> > Kirk
> >
> >
Received on Tue Jan 09 2001 - 19:26:36 CST

Original text of this message

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