Home » Developer & Programmer » Forms » display values in form6i run time (Form 6i, Oracle 10G)
display values in form6i run time [message #684580] Thu, 01 July 2021 08:16 Go to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
dear i want to get the last status of the student. If the student has enroll on April and struck/leave in December. then fee table shows (april,may,june,july,august,september,october,november) status (PRESENT) and when he leaves the status shows (N-PRESENT).
please view the attached file and test case.
/foru/forum/fa/14537/0/
Quote:

Test Case
create table student (
stuid number(5) primary key,status varchar2(30),name varchar2(40),class varchar2(40),
doa date,leav_date date,coment varchar2(40));

create table fees (
stuid number(5) references student(stuid),sno number(4),fdate date,fmonth varchar2(20),tmonth varchar2(20),adm number(5),regist number(4),ftution number(4),
other number(4),arrear number(5),tot number(4),paid number(5),bal number(5),fstat varchar2(20));


insert into student (stuid,status,name,class,doa)
values
(1,'PRESENT','ABC','ONE','02-JUN-20');
insert into student (stuid,status,name,class,doa)
values
(2,'PRESENT','BC','ONE','02-JUN-20');
insert into student (stuid,status,name,class,doa)
values
(3,'PRESENT','AC','ONE','02-JUN-20');
insert into student (stuid,status,name,class,doa)
values
(4,'PRESENT','C','PG','03-JUN-20');
insert into student (stuid,status,name,class,doa)
values
(5,'PRESENT','B','PREP','03-JUN-20');
insert into student (stuid,status,name,class,doa)
values
(6,'PRESENT','DD','ONE','04-JUN-20');
insert into student (stuid,status,name,class,doa)
values
(7,'PRESENT','AA','PG','04-JUN-20');
insert into student (stuid,status,name,class,doa)
values
(8,'PRESENT','SBC','NURSERY','03-JUN-20');
insert into student (stuid,status,name,class,doa)
values
(9,'PRESENT','SC','ONE','03-JUN-20');
insert into student (stuid,status,name,class,doa)
values
(10,'PRESENT','SAAC','NURSERY','04-JUN-20');
insert into student (stuid,status,name,class,doa)
values
(11,'PRESENT','SDC','ONE','04-JUN-20');

UPDATE STUDENT SET STATUS='N_PRESENT',LEAV_DATE='15-APR-21'
WHERE STUID IN (1,5,9);
UPDATE STUDENT SET STATUS='N_PRESENT',LEAV_DATE='1-JUN-21'
WHERE STUID IN (10,3);

INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,1,'03-JUN-20','JUNE','JUNE',100,100,500,0,0,700,500,200,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,2,'04-JUL-20','JULY','JULY',0,0,500,0,200,700,700,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,3,'04-AUG-20','AUGUST','AUGUST',0,0,500,0,0,500,500,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,4,'04-AUG-20','SEPTEMBER','SEPTEMBER',0,0,500,0,0,500,500,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,5,'06-OCT-20','OCTOBER','OCTOBER',0,0,500,0,0,500,500,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,6,'01-NOV-20','NOVEMBER','NOVEMBER',0,0,500,0,0,500,500,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,7,'16-DEC-20','DECEMBER','DECEMBER',0,0,500,0,0,500,0,0,'N_RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,8,'01-JAN-21','JANUARY','JANUARY',0,0,500,0,500,1000,1000,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,1,'06-JUN-20','JUNE','JUNE',100,100,500,0,0,700,500,200,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,2,'02-JUL-20','JULY','JULY',0,0,500,0,200,700,700,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,3,'01-AUG-20','AUGUST','AUGUST',0,0,800,0,0,800,800,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,4,'03-AUG-20','SEPTEMBER','SEPTEMBER',0,0,800,0,0,800,800,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,5,'04-OCT-20','OCTOBER','OCTOBER',0,0,800,0,0,800,800,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,6,'11-NOV-20','NOVEMBER','NOVEMBER',0,0,800,0,0,800,800,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,7,'16-DEC-20','DECEMBER','DECEMBER',0,0,800,0,0,800,800,0,'RECEIVED');
INSERT INTO FEES (stuid,sno,fdate,fmonth,tmonth,adm,regist,ftution,other,arrear,tot,paid,bal,fstat)
VALUES
(1,8,'11-JAN-21','JANUARY','JANUARY',0,0,800,0,0,800,800,0,'RECEIVED');
  • Attachment: 1.jpg
    (Size: 154.52KB, Downloaded 1142 times)
Re: display values in form6i run time [message #684583 is a reply to message #684580] Thu, 01 July 2021 10:07 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Michel Cadot wrote on Thu, 18 February 2021 07:15

...
You MUST update your test case to make it work for ANYONE.
So I repeat one more time:

Michel Cadot wrote on Wed, 17 February 2021 07:28
Michel Cadot wrote on Tue, 16 February 2021 08:35

...
ALWAYS use TO_DATE and specify the format you use in this function.
If you use month or day names, specify, in the TO_DATE function, the language you use; or better use month number.

...
...
This is basic SQL but as I am in a good mood I give the link you have to read:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions183.htm#i1003589
Previous Topic: display values in form6i run time
Next Topic: Forms 6i in Windows 10 Not Responding
Goto Forum:
  


Current Time: Fri Mar 29 02:18:17 CDT 2024