PL/SQL ERROR 103 - Line 2 .Found ';' where the following was expected 'if'
Hi,
This is the query i had written in forms module pl/sql editor
declare
a number(6);
b number(6);
c number(6);
d number(6);
e number(6);
cursor donor is select * from donor_tab where donorcode=:donor_tab_blk.donor_code;
DONORLOV Boolean;
Cityname Varchar2(35);
Statename Varchar2(35);
Countryname Varchar2(35);
Tname Varchar2(25);
Begin
--message(:Donor_tab_blk.donor_code);
--DonorLOV :=Show_LOV ('Donor_LOV');
DonorLOV:=SHOW_LOV ('DONOR1_LOV');
OPEN Donor;
Fetch Donor into
:DONOR_TAB_BLK.DONOR_CODE,
:DONOR_TAB_BLK.TITLE_CODE,
:DONOR_TAB_BLK.FIRST_NAME,
:DONOR_TAB_BLK.MIDDLE_NAME,
:DONOR_TAB_BLK.LAST_NAME,
:DONOR_TAB_BLK.DOJ,
:DONOR_TAB_BLK.ADDRESS1,
:DONOR_TAB_BLK.ADDRESS2,
:DONOR_TAB_BLK.STREET,
:DONOR_TAB_BLK.CITY_CODE,
:DONOR_TAB_BLK.PIN,
:DONOR_TAB_BLK.PHONE_NUM,
:DONOR_TAB_BLK.LANG,
:DONOR_TAB_BLK.MOBILE_NUMBER,
:DONOR_TAB_BLK.RENEWAL_DATE,
:DONOR_TAB_BLK.STATUS,
:DONOR_TAB_BLK.REMINDER;
CLOSE DONOR;
END;
if Donor_Tab_status='Y' then
Set_Item_Property('donor_tab_blk.renewal_date',displayed,property_on);
set_item_property('donor_tab_blk.renewal_date',enabled,property_true);
else if Donor_Tab_status='P' then
Set_Item_Property('donor_tab_blk.renewal_date',displayed,property_on);
set_item_property('donor_tab_blk.renewal_date',enabled,property_true);
else if Donor_Tab_status='Q' then
Set_Item_Property('donor_tab_blk.renewal_date',displayed,property_on);
set_item_property('donor_tab_blk.renewal_date',enabled,property_true);
else if Donor_Tab_status='N' then
Set_Item_Property('donor_tab_blk.renewal_date',displayed,property_on);
set_item_property('donor_tab_blk.renewal_date',enabled,property_true);
/*a:=instr(:donor_tab_blk.phone_num,'-',1,1);
b:=substr(:donor_tab_blk.phone_num,1,'a');
:donor_tab_blk.phone_num1:=b;
message('phone_num1='||b);
c:=instr(:donor_tab_blk.phone_num,'-'1,2);
d:=substr(:donor_tab_blk.phone_num,a+1,'c');
:donor_tab_blk.phone_num2:=d;
e:=substr(:donor_tab_blk.phone_num,c+1);
:donor_tab_blk.phone_num3:=e;*/
/*a:=instr(phone_num,'-',1,1);
b:=substr(phone_num,1,'a');
:donor_tab_blk.phone_num1:=b;*/
select city_name,state_name,country_name into cityname,statename,countryname
from city_master_tab where
citycode=:donor_tab_blk.city_code;
:donor_tab_blk.city_name=cityname;
:donor_tab_blk.state_name=statename;
:donor_tab_blk.country_name=countryname;
select title_name into Tname from title_tab where title_code=:donor_tab_blk.title_code;
:donor_tab_blk.title_name=Tname;
--a:=instr(Phone_num,'-',1,1);
select substr(phone_num,1,(instr(phone_num,'-',1,1)-1)) into
:donor_tab_blk.phone_num1 from donor_tab where donor_code=:donor_tab_blk.donor_code;
select instr (phone_num,'-',1,2) into c from donor_tab where donor_code=:donor_tab_blk.donor_code;
--d:=substr(phone_num,a+1,c-1);
--:donor_tab_blk.phone_num2:=d;
select substr(phone_num(instr(phone_num,'-',1,1),c-instr(phone_num,'-',1,1)-1) into
:donor_tab_blk.phone_num2 from donor_tab
where donor_code=:donor_tab_blk.donor_code;
select substr(phone_num,c+1) into :donor_tab_blk.phone_num3 from donor_tab where donor_code=:donor_tab_blk.donor_code;
--donor_tab_blk.phone_num3:=e;
go_item('donor_tab_blk.address1');
if DONOR%NOT FOUND THEN
null;
end if;
end;
The problem is , when i compile this pl/sql code i get a compilation eror saying
PL/SQL ERROR 103 - Line 2 ,column 4.. ';' where the following was expected
'if'
Can u help me?