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: The ACCEPT Command

Re: The ACCEPT Command

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Mon, 4 Oct 1999 14:23:07 GMT
Message-ID: <37F8B84B.3270A8EF@edcmail.cr.usgs.gov>


Store all of these commands in a file, then run the file. For instance, assume query_dept.sql contains:
> ACCEPT dept PROMPT 'Provide the department name: '
> SELECT *
> FROM dept
> WHERE dname = UPPER('&dept')

Then on the SQL*Plus command line, type "@query_dept.sql;". You will then be prompted for the dept name and given the results.

HTH,
Brian

SJWNet wrote:
>
> From an Oracle Student Guide (Production 1.2 / Volume 1) the following
> code is listed:
>
> ACCEPT dept PROMPT 'Provide the department name: '
> SELECT *
> FROM dept
> WHERE dname = UPPER('&dept')
>
> The first line is entered, but then the prompt shows up immediately
> rather than allowing for the rest of the code to be entered and later
> executed as a whole block of code. Entering, for example, Sales at the
> prompt followed by a return ends the routine and the SQL> prompt is
> waiting for a new command.
>
> What is the trick to getting the ACCEPT command to work?
>
> --
> SJWNet
> NT Novice
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Oct 04 1999 - 09:23:07 CDT

Original text of this message

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