Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: ACCEPT
That did work, thank you Sybrand.
I have 2 questions which I hope you could answer:
1 - with using insert and all (either i or 0) , how does one put in a
line with just space. ?
2 - I did what you said, retrieve the file, put in the accept
statement and re-rum it and it works! Now, I re-save it
with the accept statement in there and when I did a 'get'
the accept is part of the codes within.
However, when I execute it (worked perfectly) and then did a
l to look at the code, the accept isn't in there. - Why ?
Arthur
On Sun, 10 Sep 2000 17:07:28 +0200, "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
>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:34:56 CDT