I'm new in writing SQL plus scripts and i have an issue. I want to write install script for my PL/SQL utility which ask user some questions (via ACCEPT command) and then list what will be done (via PROMPT) and ask for confirmation (again via ACCEPT). This part is OK, but than I have problem, I need either run some PL/SQL scripts if he accept or ask him all questions again if he reject. Is in SQL plus any option how to do an interactive loop which decide based on variable content whether to proceed and run PL/SQL script or loop back to begining of loop?
in pseudo code I want something like this:
while ('&confirmation' != 'y'){
/*ask some questions*/
ACCEPT info_1 CHAR PROMPT 'text_1';
ACCEPT info_2 CHAR PROMPT 'text_2';
...
/*write some summary*/
PROMPT 'text_2';
/*ask for confirmation */
ACCEPT confirmation CHAR PROMPT 'are these information correct? (y/n)';
}
@skript
Thanks