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: SQLPLUS PROBLEM : How to test if a variable is defined ?

Re: SQLPLUS PROBLEM : How to test if a variable is defined ?

From: Jaap W. van Dijk <j.w.vandijk_at_hetnet.nl>
Date: Thu, 07 Feb 2002 19:17:39 GMT
Message-ID: <3c62d228.3412056@news.jaapwvandijk.myweb.nl>


I suppose you want the script to be run and if the parameter is not supplied you want the ACCEPT executed. But if you don't specify a parameter you will be prompted with something like 'Give value for 1:'.

Jaap.

On 5 Feb 2002 03:47:25 -0800, plavigerie_at_transiciel.com (Philippe LAVIGERIE) wrote:

>Hi all,
>I would like to test if a variable is defined in a script.
>Example :
>CONN.SQL
>> if &1='' then ACCEPT 1 PROMPT "Give the instance name"
>> connect system/manager@&1
>
>I can not use COL 1 NEW_VALUE because I'm not connected before running CONN.SQL
>Is it possible or not ?
>Thanks for your answers.
Received on Thu Feb 07 2002 - 13:17:39 CST

Original text of this message

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