Re: Q: Execute SQL from command line?
From: Janusz Pawlinka <jpawl_at_wasko.gliwice.pl>
Date: Thu, 22 Jul 1999 16:24:50 +0100
Message-ID: <379737C2.B37CEA8A_at_wasko.gliwice.pl>
Date: Thu, 22 Jul 1999 16:24:50 +0100
Message-ID: <379737C2.B37CEA8A_at_wasko.gliwice.pl>
Lu Gan wrote:
>
> Hi,
>
> Is there a simple way to execute a SQL statement against an Oracle
> database from the command line and have the result output to stdout or
> to a file? I am expecting something like:
>
> $ sqlplus2 connect-string -e "sql-statement" > /tmp/file.1
>
> Any help will be greatly appreciated!
>
> - Lu
$sqlplus connect_string _at_file.sql > output.txt
file.sql contains "sql-statement"
Janusz Pawlinka
jpawl_at_wasko.gliwice.pl
Received on Thu Jul 22 1999 - 17:24:50 CEST