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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Piping Unix output to SQL*plus

Re: Piping Unix output to SQL*plus

From: <venkat_rajagopal_at_my-deja.com>
Date: Tue, 23 Jan 2001 23:09:08 GMT
Message-ID: <94l2ue$onc$1@nnrp1.deja.com>

All,

    Thanks for your replies but none of them will work. Let me give you a few more details. If I am doing something wrong please point it out.

   AN example is shown below:

   The file test.sql has teh lines below.

   $ cat test.sql

    SET FEEDBACK OFF     SELECT value
    FROM v$parameter
    WHERE name = '&&X';

   The HERE documnet as someone suggested does not work because    it terminates pematurely as shown below:

   $ sqlplus -s / << !

     > @test.sql

>!

    Enter value for x:
    User requested Interrupt or EOF detected.    $

   Standard piping does not work as shown below because that also    terminates prematurely as shown below:

   $ cat test.sql | sqlplus -s /

    Enter value for x: old 3: WHERE name = '&&X'     new 3: WHERE name = ''
   $

   I want the script to prompt for x, then exit.

   There are reasons I am asking for this. If you can help, please    do. Someone suggested that I change the design - I will if I need    to , but I want to know if this can be done. Chnaging the design    at this point is not in the equation. .

   Hope that helps. Try it out yourself and see if it works for you.

   Thanks
   Venkat

Sent via Deja.com
http://www.deja.com/ Received on Tue Jan 23 2001 - 17:09:08 CST

Original text of this message

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