Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

multiple user inputs from user

OraFighterJan 11 2013 — edited Jan 11 2013
Enter 1 file location : c:\db
Enter 2 file location : d:\db
Enter 3 file location : e:\db
Enter 4 file location : f:\db
Enter 5 file location : g:\db


I should display

c:\db
d:\db
e:\db
f:\db
g:\db

DECLARE
  TYPE file_location_type IS TABLE OF VARCHAR2 (500);
  NUMBER_OF_DISK NUMBER := '&Enter_number_disks_available';                 
  file_location file_location_type := file_location_type();   
BEGIN
	 
	FOR I IN 1..NUMBER_OF_DISK
	LOOP
  		file_location(I) := '&Enter_Disk_location';
	 	DBMS_OUTPUT.PUT_LINE('Disk Location You enter '||file_location(I));
	END LOOP;
end;
Please guide me how to use arrays ..?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2013
Added on Jan 11 2013
12 comments
357 views