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!

Conditional Exit from the script

cdprasadAug 12 2010 — edited Aug 12 2010
Hi,

I have to code the script like the below
--Step 1
begin

 If <Table1 doesnot exist> then
 Display "User Defined Error Message: Table1 doesnot exit"
 EXIT FROM THE SCRIPT(Below sql should not run)
 endif

end

--Step 2
spool abc.txt;
select "should not run" from Table1;
spool off;
Step 2 should not run if table1 doesnot exist.

Can someone please tell how to conditionally exit the script.


Thanks & Regards,C
CDPrasad

Edited by: cdprasad on Aug 12, 2010 1:35 PM

Edited by: cdprasad on Aug 12, 2010 1:36 PM

Edited by: cdprasad on Aug 12, 2010 1:38 PM

Edited by: cdprasad on Aug 12, 2010 1:38 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 9 2010
Added on Aug 12 2010
10 comments
5,308 views