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

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

Re: ACCEPT

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 10 Sep 2000 17:07:28 +0200
Message-ID: <968599118.10796.0.pluto.d4ee154e@news.demon.nl>

The problem here is your accept statement made it into the sql buffer. When you want to use accept you should first save your sqlstatement as a file (save <filename> [replace]), then edit that file name, add the accept statement (preferrably with a blank line after it) and run it by using @<filename>
or
start <filename>

Hth,

Sybrand Bakker, Oracle DBA

"Puppet Master" <mechhunter_at_rocketmail.com> wrote in message news:39bb9f2c.40821205_at_news.iinet.net.au...
> Hi,
> I am learning Oracle SQL and I am hoping someone can help me with
> ACCEPT. Below is the code I am using :
>
> 1 ACCEPT dept PROMPT 'Provide the department name: '
> 2 SELECT *
> 3 FROM dept
> 4* WHERE dname = UPPER('&dept')
>
> Enter value for dept: sales
> old 4: WHERE dname = UPPER('&dept')
> new 4: WHERE dname = UPPER('sales')
>
> ACCEPT dept PROMPT 'Provide the department name: '
> *
> ERROR at line 1:
> ORA-00900: invalid SQL statement
>
> It all works but when you enter something, the whole code
> execute but bombs out at the accept. I am unsure as to
> what I am doing wrong, please help.
>
> Arthur
Received on Sun Sep 10 2000 - 10:07:28 CDT

Original text of this message

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