Skip to Main Content

Oracle Database Discussions

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!

how to stop the execution of a sql script ?

403646Sep 12 2003 — edited Sep 15 2003
I have these sql instructions in one single file TEST.SQL which will be executed with SQLplus.
var version1 varchar2(255)
var version2 varchar2(255)

select * from activity
order by act_code;

begin
select par_value into :version1
from param_tab
where par_code = 'VERSION';
:version2 := '2003-281';
end;
/

begin
if :version1 != :version2 then
********
end if;
end;
/

select * from grade
order by gra_code;

Is it possible that when the condition :version1 != :version2 is satisfied, to stop the execution of this script at this point and not executing the next sql statement ?

Please help...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2003
Added on Sep 12 2003
2 comments
645 views