Re: SQL question

From: Marcel Claus <Marcel.Claus_at_Informatik.Uni-Oldenburg.DE>
Date: Thu, 30 Jul 1998 15:29:48 +0100
Message-ID: <6ppsg2$gau_at_news.Informatik.Uni-Oldenburg.DE>


Dennis M. Hancy wrote:

> I wrote a SQL script that executes a simple SELECT statement. Within
> this statement, I want to prompt the user for the value of a certain
> field in the table I'm selecting from. It looks something like this:
>
> select &fieldname from sometable where SomeConditionIsTrue
>
> Ahead of this select statement I have a "spool" command so that all
> my output will be directed to a file. I don't want the output shown
> on the screen so I also have a "set term off" in there as well.
>
> This works fine to suppress the screen output.. However... the user
> is no longer prompted for the value of &fieldname. The program
> still stops for the user to enter this information but there is no
> prompt saying what information is required.
>
> My question is.. How can I keep the prompt for &fieldname but not have
> any of the select statement output appear on the screen?
>
> Dennis Hancy
> Eaton Corporation
> Cleveland, OH

Use

accept my_var char prompt 'This is a prompt: ';

Reference the variable via

&my_var

Marcel Received on Thu Jul 30 1998 - 16:29:48 CEST

Original text of this message