Re: How to use values from SQL to OS?

From: Gollum <gollum.NOSPAM_at_image.dk>
Date: 2000/02/04
Message-ID: <389b4acf.6925257_at_news.image.dk>#1/1


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 - 00:00:00 CET

Original text of this message