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!

if, exception, elsif, else ???

645300Nov 9 2009 — edited Nov 9 2009
i was trying to build procedure in this format

Begin
for loop1
for loop2
begin
if a = not null then
insert into main table;
exception when dup_val_index
then insert into second table;
when others then
elsif b = null and c = not null then
insert into second table;
else b = null and d = not null then
insert into second table;
endif;
end;
end loop2;
end loop1;
end;

i was getting the following error....


PLS-00103: Encountered the symbol "THEN" when expecting one of the following:

* & = - + < / > at in is mod remainder not rem when


Any idea why
????

Thank you!!!!
This post has been answered by Frank Kulash on Nov 9 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2009
Added on Nov 9 2009
3 comments
1,081 views