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: Quick question about variable substitutions

Re: Quick question about variable substitutions

From: Rick Hall <rickhall2000_at_hotmail.com>
Date: Tue, 19 Dec 2000 16:36:34 -0500
Message-ID: <3A3FD4E2.710E9801@hotmail.com>

Where you want a variable, try prefacing it with a colon. Like this:

select employee_name from employees where start_date= :Start_date;

Rick

antje wrote:

> I am still pretty new to Oracle, and I am having problems finding a way
> to prompt the users for variable information. In SQL *Plus you can do
> this by using the ampersand. for example:
>
> select employee_name from employees where start_date='&Start_date';
>
> Unfortunately, this only works in SQL *Plus. I get the error "a non-
> numeric character was found where a numeric was expected" if I try the
> same query in Oracle SQL Worksheet. Is there a way in other
> applications, such as SQL worksheet, to prompt the users to enter in
> certain parameters? I searched this newgroup, and FAQ's and could not
> find anything other than the Ampersand syntax.
>
> Specifics:
> The query that I would be using that would prompt the user would be
> similar to the above example.
>
> Currently using:
> Oracle8i Release 8.1.6.0.0
>
> Thanks for any help you can provide!
>
> Nicole
>
> Sent via Deja.com
> http://www.deja.com/
Received on Tue Dec 19 2000 - 15:36:34 CST

Original text of this message

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