I need to write an oracle sql script based on some condition.
Like User has to type 'y' or 'n' if he types 'y' then i need to
accept gen prompt 'Enter y if you want to generate spool' default 'n'
spool c:\a.spl
SELECT CUST_ID INTO NO
FROM ACC_MASTER
WHERE ACCOUNT_NO='&CRN'
AND BRANCH_NO='&BRN';
select * from a where lid=no;
select * from b where lid=no;
select * from c where lid=no;
spool off;
If the user types 'N' Nothing needs to be selected.
Please advise