Executing a sql file through an anonymous block
Hi,
I am encountering an error while trying to execute a SQL file through an anonymous block:
PROMPT Press y if you want to proceed with the current values, or press n if you want to re-enter the values
ACCEPT cChoice CHAR Prompt 'Enter y or n: '
DECLARE
cChoice CHAR(1) := '&cChoice';
BEGIN
IF cChoice = 'y'
THEN
DBMS_OUTPUT.PUT_LINE('Starting with the refresh process');
DBMS_OUTPUT.PUT_LINE('---------------------------------------------');
ELSE IF cChoice = 'n'
THEN
start test.sql;
END IF;
END;
/
I am getting an error if I enter n at the command prompt. Where am i going wrong?
Kindly advice.