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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to use values from SQL to OS?

Re: How to use values from SQL to OS?

From: Gollum <gollum.NOSPAM_at_image.dk>
Date: Fri, 04 Feb 2000 22:06:11 GMT
Message-ID: <389b4acf.6925257@news.image.dk>


I usually do like this:

#!/bin/sh

# Setup Oracle environment
ORACLE_HOME=... ; export ORACLE_HOME
NLS_LANG=... ; export NLS_LANG
# etc.

UNIXVAR=`$ORACLE_HOME/bin/sqlplus -s scott/tiger << EOD set heading off feedback off verify off select count(*) from emp;
EOD
`

You might need to filter the first (blank) line using awk or another utility.

Cheers,
Gollum

On Fri, 4 Feb 2000 23:35:31 +0200, "Zeev Milin" <zeev.milin_at_dealtime.com> wrote:

>I am writing a script to pass value (select count(*) from emp) to OS.
>I would like to use it with os command - how can i do it?
>
>
Received on Fri Feb 04 2000 - 16:06:11 CST

Original text of this message

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