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 -> Problem with accept in PL/SQL

Problem with accept in PL/SQL

From: Kumaril Bhatt <worldkumaril_at_yahoo.com>
Date: 13 Mar 2003 00:24:22 -0800
Message-ID: <4a678c58.0303130024.474f6677@posting.google.com>


Hi everybody,
My name is Kumaril Bhatt and I know SQL*plus. I am not that familiar with PL/SQL. I want use loops in PL/SQL with user interaction. So I tried using an accept statement in a PL/SQL loop. But I got errors. I dont know much about scripts. So if any one could provide me with a script, so that the loop below can be executed. The loop asks the user whether he wants to insert more rows.

DECLARE

ans char(1) :='y';
cid char(4);
vid char(4);

vname varchar(15);

begin

while(ans = 'y')

accept cid prompt "Enter customer id : "; accept vid prompt "Enter video id : ";
accept vname prompt "Enter videoname : ";

insert hire
values (cid,vid,vname);

accept ans prompt "Any more y/n : ";

end;

Thank You very Much
Kumaril Received on Thu Mar 13 2003 - 02:24:22 CST

Original text of this message

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