declare
date_month varchar2(10);
date_list date;
period_total int :=0;
k int:=0;
x int:=0;
y varchar2(100) :=' ';
p int:=0;
b1 int:=0; b2 int:=0; b21 varchar2(100); b3 int:=0; b4 int:=0; b5 int:=0; b6 int:=0; b7 int:=0; b8 int:=0;
x1 int:=0;
begin
:system.message_level := '20';
commit;
clear_list ('block3.l');
x1 :=0;
for i in (
select distinct (substr(dates,4)) a,count(*) b, count(*)*7 c from cp_dates where valid = 1 group by substr(dates,4) ) loop
k:=k+1;
add_list_element ('block3.l', k,i.a||' '||i.b||' '||i.c,1);
for j in (select dates from cp_dates where substr(dates ,4) = i.a and valid = 1) loop
k:=k+1;
add_list_element ('block3.l',k,j.dates,1);
for l in (select * from cp_exam where x is not null order by branch,sem,regno) loop
k :=k+1;
if l.x = 4 then
for m in 70..80 loop
k:=k+1;
p:=round(i.c*m/100);
end loop;
end if;
/*
if p > 7 then
b1 := b1+7;
if b1 <p then
add_list_element ('block3.l',k,l.regno||' '||rpad(l.sname,20,' ')||' '||j.dates||' '||rpad(' ',7+1,'\')||' '||b1||' '||p,1);
b2 := p-b1;
elsif b2 < 7 and b2 <> 0 then
add_list_element ('block3.l',k,l.regno||' '||rpad(l.sname,20,' ')||' '||j.dates||' '||rpad(' ',b2+1,'*')||rpad(' ',7+1-(b2),'A')||' '||b2||' '||p,1);
b2 := 0;
elsif b2 = 0 then
add_list_element ('block3.l',k,l.regno||' '||rpad(l.sname,20,' ')||' '||j.dates||' '||rpad(' ',7+1,'A')||' '||b2||' '||p,1);
elsif b2 = 7 then
add_list_element ('block3.l',k,l.regno||' '||rpad(l.sname,20,' ')||' '||j.dates||' '||rpad(' ',7+1,'/')||' '||b2||' '||p,1);
end if;
end if;
if p <= 7 then
add_list_element ('block3.l',k,l.regno||' '||rpad(l.sname,20,' ')||' '||j.dates||' '||rpad(' ',p+1,'/')||rpad(' ',7+1-p,'A')||' '||p,1);
end if;
*/
END LOOP;
end loop;
end loop;
end;
date_month varchar2(10);
date_list date;
period_total int :=0;
k int:=0;
x int:=0;
y varchar2(100) :=' ';
p int:=0;
b1 int:=0; b2 int:=0; b21 varchar2(100); b3 int:=0; b4 int:=0; b5 int:=0; b6 int:=0; b7 int:=0; b8 int:=0;
x1 int:=0;
begin
:system.message_level := '20';
commit;
clear_list ('block3.l');
x1 :=0;
for i in (
select distinct (substr(dates,4)) a,count(*) b, count(*)*7 c from cp_dates where valid = 1 group by substr(dates,4) ) loop
k:=k+1;
add_list_element ('block3.l', k,i.a||' '||i.b||' '||i.c,1);
for j in (select dates from cp_dates where substr(dates ,4) = i.a and valid = 1) loop
k:=k+1;
add_list_element ('block3.l',k,j.dates,1);
for l in (select * from cp_exam where x is not null order by branch,sem,regno) loop
k :=k+1;
if l.x = 4 then
for m in 70..80 loop
k:=k+1;
p:=round(i.c*m/100);
end loop;
end if;
/*
if p > 7 then
b1 := b1+7;
if b1 <p then
add_list_element ('block3.l',k,l.regno||' '||rpad(l.sname,20,' ')||' '||j.dates||' '||rpad(' ',7+1,'\')||' '||b1||' '||p,1);
b2 := p-b1;
elsif b2 < 7 and b2 <> 0 then
add_list_element ('block3.l',k,l.regno||' '||rpad(l.sname,20,' ')||' '||j.dates||' '||rpad(' ',b2+1,'*')||rpad(' ',7+1-(b2),'A')||' '||b2||' '||p,1);
b2 := 0;
elsif b2 = 0 then
add_list_element ('block3.l',k,l.regno||' '||rpad(l.sname,20,' ')||' '||j.dates||' '||rpad(' ',7+1,'A')||' '||b2||' '||p,1);
elsif b2 = 7 then
add_list_element ('block3.l',k,l.regno||' '||rpad(l.sname,20,' ')||' '||j.dates||' '||rpad(' ',7+1,'/')||' '||b2||' '||p,1);
end if;
end if;
if p <= 7 then
add_list_element ('block3.l',k,l.regno||' '||rpad(l.sname,20,' ')||' '||j.dates||' '||rpad(' ',p+1,'/')||rpad(' ',7+1-p,'A')||' '||p,1);
end if;
*/
END LOOP;
end loop;
end loop;
end;
Responses
0 Respones to "Oracle Forms - Student Selection Procedure"
Post a Comment
Comment