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

Home -> Community -> Usenet -> c.d.o.misc -> Re: A little help with a sqlscript needed ...

Re: A little help with a sqlscript needed ...

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Tue, 20 Oct 1998 16:11:07 GMT
Message-ID: <362db547.16211961@dcsun4.us.oracle.com>


On Tue, 20 Oct 1998 17:44:40 +0200, Thomas Klinger <t.klinger_at_mobilkom.at> wrote:

>Hi there!
>
>Maybe one of you can help me.
>I have 2 scripts, one shellscript and one sqlscript.
>The shellscript should pipe the sqlscript into sqlplus this way:
>...
>sqlplus <user>/<password> < my_script.sql
>...
>
>The output is like this:
>...
>Connected to:
>Oracle7 Server Release 7.3.2.3.0 - Production Release
>With the distributed option
>PL/SQL Release 2.3.2.3.0 - Production
>
>SQL> DOC>DOC>SQL> SQL> SQL> SQL> SQL> SQL> SQL> 2 3 4 5
>6 7 8 9
>...
>SQL> 2 3 4 5 6 7 8
>...
>SQL> 2 3 4 5 6 7
>...
>SQL> Disconnected from Oracle7 Server Release 7.3.2.3.0 - Production
>Release
>With the distributed option
>PL/SQL Release 2.3.2.3.0 - Production
>...
>
>How can I handle this that the output is only the information I want and
>not this boring lines between?
>I already tried to set everything off:
>set verify off
>set feedback off
>set echo off
>...
>
>Can somebody help me? Thanks in forward.

Try spooling your output...

create a file aaa.sql like

set verify off
set feedback off
set echo off
set heading off
spool output.txt
select count(*) from dual;
exit

then issue the command

--> sqlplus user/pass @aaa.sql

this will create a file output.txt which contains just

1

Hope this helps.

chris.

>
>Kind regards, Thomas
>
>P.S.: This happens on HPUX 10.20 with ORACLE 7.3.2, csh-environment
>
Received on Tue Oct 20 1998 - 11:11:07 CDT

Original text of this message

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