Re: SQL*Plus reading from standard input?

From: Bob Swisshelm <swisshelm_at_lilly.com>
Date: 7 Mar 95 07:02:50 EST
Message-ID: <1995Mar7.070250.4144_at_inet.d48.lilly.com>


In article <3jg0l9$9al_at_hearye.mlb.semi.harris.com> Tom Gillespie, tgillesp_at_ms13.mis.semi.harris.com writes:
>All I want to do is run a script like this:
>
>#!/bin/ksh
>sqlplus user/pass << !
>select * from my_table;
>
>!

Your script works fine for me under ksh on Solaris 2.3.

I don't know where the 'Press Return to continue' message that you describe is coming from. You might want to see if you have a login.sql file that is being read by sqlplus. It could be running such as 'set pause on', which might mess you up.

Otherwise, you problem might be specific to your flavor of UNIX.

I would also recommend against using the !. That is the character that SQLPLUS using in UNIX (solaris, at least) as an alternative to the HOST command.

Bob Swisshelm | swisshelm_at_Lilly.com | 317 276 5472 Eli Lilly and Company | Lilly Corporate Center | Indianapolis, IN 46285 Received on Tue Mar 07 1995 - 13:02:50 CET

Original text of this message