Re: How to pass resoult of the sql to the system variable?

From: Tom Mahoney <mahoneyt_at_ntr.net>
Date: 1998/05/12
Message-ID: <6jaa9s$dii4_at_news2.ntr.net>#1/1


If the single column (1 row) value is a number, you might return the single value as the exit (return code). (This works for integers less than 255 or some other number; ymmv (check your system docs).) -- sqlplus coe start
column return_val NEW_VALUE return_val -- see SQLPLUS docs SELECT column_wanted return_val FROM table WHERE whatever; EXIT &return_val

If the value is not a number but less than n lines, you can call sqlplus -s
select the values,

and then parse the values using the unix `cmd` or ksh $(cmd) shell operators.

If many lines, spool the file and parse it.

-tm

Robert Augustyn wrote in message <6j7jfb$sgm$1_at_mail.pl.unisys.com>...
>Hi,
>I am trying to get value I sql select into to the operating system variable
>on unix
>Any idea how to do that other then spooling and then reading from a file?
>Thanks in advance for any help
>robert
>
>
Received on Tue May 12 1998 - 00:00:00 CEST

Original text of this message