Re: passing SQL statements to sqlplus

From: Ray Porter <ray_porter_at_unc.edu>
Date: 2000/07/31
Message-ID: <8m3qq2$kjj$1_at_news2.isis.unc.edu>#1/1


Thanks, Conan. I'll give that a try. It looks like it may do exactly what I want.

--
================================================
Ray Porter
Applications Analyst Programmer
Administrative Information Services, UNC-CH
Phone: 966-5878
email: ray_porter_at_unc.edu
       dragon_at_email.unc.edu
Home Page: http://www.unc.edu/~dragon/

"Meddle not in the affairs of dragons,
for thou art crunchy and taste good with ketchup."

"Conan Farrell as-if.com>" <conan_at_<no-spam> wrote in message
news:RBhg5.11006$r4.5670_at_news.indigo.ie...

> from unix you can do something like this
>
>
> sqlplus username/password << eof1
> select * from tab;
> exit
> eof1
>
> This will execute anything between the eof1 on the first line and the eof1
> on the last line. Not sure if thats what you want.
>
> Conan
>
>
> Ray Porter wrote in message <8ls1qk$o1m$1_at_news2.isis.unc.edu>...
> >I know how to pass a file containing sql statements to SQLPlus in silent
> >mode. Is there a way to pass a single sql statement without putting it
in a
> >file? I'd like to be able to do something like:
> >
> >sqlplus -s user/passwd 'truncate table myTable'
> >
> >Is there anyway to do this without putting the truncate (or any other
> >statement) in a file?
> >
> >Thanks,
> >================================================
> >Ray Porter
> >Applications Analyst Programmer
> >Administrative Information Services, UNC-CH
> >Phone: 966-5878
> >email: ray_porter_at_unc.edu
> > dragon_at_email.unc.edu
> >Home Page: http://www.unc.edu/~dragon/
> >
> >"Meddle not in the affairs of dragons,
> >for thou art crunchy and taste good with ketchup."
> >
> >
> >
>
>
Received on Mon Jul 31 2000 - 00:00:00 CEST

Original text of this message