Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ACCEPT statement

Re: ACCEPT statement

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Fri, 16 Jul 1999 20:44:22 +0200
Message-ID: <932150635.24641.0.pluto.d4ee154e@news.demon.nl>


Hi Dennis,
First to your question: all sql is parsed backwards. This happens because there are several errors in your script 1 accept is not a valid pl/sql command, it is a sqlplus command only. It should be outside/before the declare section. 2 the &username in your select needs to be enclosed by a single quote.

Hth,

Sybrand Bakker, Oracle DBA

<dennishancy_at_eaton.com> wrote in message news:7mnqsp$ltj$1_at_nnrp1.deja.com...
> declare
> username char(6);
> begin
> accept username prompt 'Please enter a username right here: ';
> select field
> from table
> where usr = &username;
> end;
>
>
> This is just a portion of my sql script. When I run it, the first thing
> I see is this:
>
> Enter a value for username:
>
> I'm assuming this is the generic prompt that comes from the &username
> part of the where statement.
>
> Why does this run before my "accept" statement?
>
>
> Dennis Hancy
> Eaton Corporation
> Cleveland, OH
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Fri Jul 16 1999 - 13:44:22 CDT

Original text of this message

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