You are mixing SQL*Plus Substitution Variables with PL/SQL code which probably won't work properly.
Good approach could be to split your script into five scripts.
The first would just ask the choice and then call another script according the user's choice:
Code:
define menuline='-------------------------'
ttitle center STUDENT MANIPULATION SCREEN
PROMPT STUDENT MANIPULATION MENU
PROMPT &menuline
PROMPT
PROMPT 1. Add Records
PROMPT
PROMPT 2. Modify Records
PROMPT
PROMPT 3. Delete Records
PROMPT
PROMPT 4. Quit
PROMPT
ACCEPT choice PROMPT 'Enter your choice (1 - 4) :'
@script&choice
Then script1.sql would be:
Code:
begin
insert_proc(&rollno,to_date('&dob'),&marks_science,&marks_maths);
end;
...
and finally script4.sql would be simply : HTH,
Ales
Bookmarks