Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Generating Blank Lines in SQLPlus
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 youwish.
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
![]() |
![]() |