Re: selecting into unix variable

From: Tony Jambu <aaj_at_phantom.telecom.com.au>
Date: 1995/10/20
Message-ID: <467gkk$gmf_at_newsserver.trl.OZ.AU>#1/1


In article <1995Oct16.183321.24297_at_lamont.ldgo.columbia.edu>, anarayan_at_sctcorp.com (Ananta Narayanan) writes:
> Ellen Storz <ellen_at_.pacific.net> wrote:
 

> Write this into a script
> file get_sequence.sql
>
> set verify off
> set feedback off
>
> select seq.nextval
> from dual
> /
> exit sql.sqlcode
>
> Just write
>
> UNIX_VAR=`sqlplus -s <usercode>/<password> _at_get_sequence.sql`

Be warn that the maximum value you can have is 256.

ta
tony

-- 
 _____       ________ / ___ |Tony Jambu, Database Consultant
  /_  _        /_ __ /      |Wizard Consulting,Aust (ACN 065934778)
 /(_)/ )(_/ \_/(///(/_)/_(  |CIS: 100250.2003_at_compuserve.com FAX: +61-3-4163559
 \_______/                  |EMAIL:TJambu_at_wizard.com.au PHONE: +61-3-4122905
Received on Fri Oct 20 1995 - 00:00:00 CET

Original text of this message