hello here is my procedure
create or replace procedure proc_merit
is
v_fsc degrees.degree_id%type;
v_matric degrees.degree_id%type;
v_bsc degrees.degree_id%type;
cursor merit_cursor is
select applicant.application_no, applicant.First_name || ' ' || applicant.Last_name as name,
degree_result.degree_id, degree_result.obltained_marks, applicant.test_marks
from applicant, degree_result, degrees
where applicant.application_no = degree_result.applicaion_no
and (degree_result.degree_id = 'FSC' or degree_result.degree_id =
'Matric' or degree_result.degree_id = 'BSC');
begin
for merit_record in merit_cursor loop
if merit_record.degree_id = 'Matric' then
v_matric := merit_record.obltained_marks;
elsif merit_record.degree_id = 'FSC' then
v_fsc := merit_record.obltained_marks;
elsif merit_record.degree_id = 'BSC' then
v_bsc := merit_record.obltained_marks;
insert into merit_list values(merit_record.application_no,
merit_record.Name, merit_record.father_name, v_matric, v_fsc, v_bsc,
10*(v_matric/850) + 50*(v_fsc/1100) + 40*(merit_record.test_marks/100));
end if;
end loop;
commit;
end proc_merit;
well wen i compile it says
21/3 PL/SQL: SQL Statement ignored
21/46 PLS-00302: component 'APPLICATION_NO' must be declared
any comments?
create or replace procedure proc_merit
is
v_fsc degrees.degree_id%type;
v_matric degrees.degree_id%type;
v_bsc degrees.degree_id%type;
cursor merit_cursor is
select applicant.application_no, applicant.First_name || ' ' || applicant.Last_name as name,
degree_result.degree_id, degree_result.obltained_marks, applicant.test_marks
from applicant, degree_result, degrees
where applicant.application_no = degree_result.applicaion_no
and (degree_result.degree_id = 'FSC' or degree_result.degree_id =
'Matric' or degree_result.degree_id = 'BSC');
begin
for merit_record in merit_cursor loop
if merit_record.degree_id = 'Matric' then
v_matric := merit_record.obltained_marks;
elsif merit_record.degree_id = 'FSC' then
v_fsc := merit_record.obltained_marks;
elsif merit_record.degree_id = 'BSC' then
v_bsc := merit_record.obltained_marks;
insert into merit_list values(merit_record.application_no,
merit_record.Name, merit_record.father_name, v_matric, v_fsc, v_bsc,
10*(v_matric/850) + 50*(v_fsc/1100) + 40*(merit_record.test_marks/100));
end if;
end loop;
commit;
end proc_merit;
well wen i compile it says
21/3 PL/SQL: SQL Statement ignored
21/46 PLS-00302: component 'APPLICATION_NO' must be declared
any comments?