| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: ACCEPT
Hi Sybrand,
Thank you again for answering my question. *smile*
I understand what you mean about the SQL and SQL plus -
kinda made sense and all.
Ignore my other question, I found out that I can use
REM to insert a 'comment' line to seperate the
SQL*Plus from SQL SELECT Statement, so that
works good. *smile*
Thank you again
Arthur
On Sun, 10 Sep 2000 21:36:19 +0200, "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
>1) somehow I don't seem to understand the question.
>You need to insert a single ' '?
>Wouldn't that just be insert into foo values (' ')
>Or am I missing something?
>
>2)
>Accept is a sqlpl*plus construct, it doesn't belong to the sql language and
>it is available in sql*plus only. The buffer however contains *sql*
>statements only, so no sql*plus statements. That just the way it works.
>
>Hth,
>
>Sybrand Bakker, Oracle DBA
>
>
>
>"Puppet Master" <mechhunter_at_rocketmail.com> wrote in message
>news:39bba991.43482426_at_news.iinet.net.au...
>> 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 - 23:20:25 CDT
![]() |
![]() |