Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQLPlus - How to spool without query string?

1,136 views
Skip to first unread message

Son KwonNam

unread,
Sep 21, 2005, 4:21:46 AM9/21/05
to
Hello,

When I spool select query results with SQL*Plus,
It always add query strings to the spooled file.

How to spool without query string?

I need to use the spooled file in a cron job.
But because the spooled file has garbage strings, it's very difficult to
use that.

Regards,
KwonNam.

Isa

unread,
Sep 21, 2005, 4:44:09 AM9/21/05
to
Hi:
you can put at the beginning of the select:
set termout off
set arraysize 5
set echo off
set verify off
set heading off

This removes all the text from the query result. Only remains the
values of the select
I hope it's usefull to you.
Regards,
Isa

Noel

unread,
Sep 22, 2005, 5:14:45 AM9/22/05
to
User Isa wrote:

> Hi:
> you can put at the beginning of the select:
> set termout off
> set arraysize 5
> set echo off
> set verify off
> set heading off

You could also add "set pages 0" to eliminate empty line after each page.

--
Noel

T

unread,
Sep 22, 2005, 9:05:11 AM9/22/05
to
Seek!!
http://www.ss64.com/orasyntax/plus_set.html


"Noel" <tb...@go2.pll-l> wrote in message
news:dgtspl$5mh$1...@inews.gazeta.pl...

DA Morgan

unread,
Sep 23, 2005, 7:36:59 PM9/23/05
to

Why arraysize 5? That should do nothing but slow down the query
by quite a bit. I'd suggest you try with an arraysize of 100-200
as a general rule.
--
Daniel A. Morgan
http://www.psoug.org
damo...@x.washington.edu
(replace x with u to respond)

Son KwonNam

unread,
Sep 26, 2005, 2:37:44 AM9/26/05
to
Thank you, all.
It works perfectly.

But when I try this, I had to make *.sql script file
and run like "sqlplus user/passwd @test.sql"

It did not work interactively on sql*plus.

Anyway that's what I exactly wanted.

Thanks again.

Son KwonNam

unread,
Sep 26, 2005, 2:43:38 AM9/26/05
to
When I tried another query which has alot of result rows,
it did not have any query string but, it had the following line.
--------------------------
99 rows selected.
--------------------------

Is it possible to remove that line?

Thanks.
~
Son KwonNam 쓴 글:

Noel

unread,
Sep 26, 2005, 3:18:25 AM9/26/05
to
User Son KwonNam wrote:
> When I tried another query which has alot of result rows,
> it did not have any query string but, it had the following line.
> --------------------------
> 99 rows selected.
> --------------------------
>
> Is it possible to remove that line?
>

SET FEEDBACK OFF

--//**

SQL> select * from cat where rownum = 1;

TABLE_NAME TABLE_TYPE
------------------------------ -----------
AA TABLE

SQL> set feedback on
SQL> /

TABLE_NAME TABLE_TYPE
------------------------------ -----------
AA TABLE

1 row selected..

SQL> set feedback off
SQL> /

TABLE_NAME TABLE_TYPE
------------------------------ -----------
AA TABLE
SQL>

--
TomekB tb...@go2.pl-l

0 new messages