Google Answers Logo
View Question
 
Q: loops in SQL*PLUS PL/SQL ( No Answer,   0 Comments )
Question  
Subject: loops in SQL*PLUS PL/SQL
Category: Miscellaneous
Asked by: kumaril-ga
List Price: $10.00
Posted: 13 Mar 2003 00:40 PST
Expires: 25 Jan 2005 09:15 PST
Question ID: 175537
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
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy