Hi,
I have a table that looks like this:
Tablename: Dchkroll.dbf
Fieldname -> Name , Empno , D01, D02, D03, D04, D05, D06, ... , D29, D31
(D01 to D31 is referring to working days which holding working-hours for the day.)
I want to manipulate the D01-D31 (1 to 31 without the 'D') from the above table to compare it with 'HOLDATE' (DAY) value in the following table:
Tablename: Holiday.dbf
Fieldname -> Month , Holdate , Holdesp , PH
('HOLDATE' values is in DATE format)
The code that i'm trying to write is something like this:
[using do-while/for-next/scan-endscan to read from Dchkroll.dbf]
if the 1-31 of the D01-D31 fieldname is equal to day(HOLDATE) then
*store data into a cursor cursor_table_name (name, empno, holdate, hours)
end if
I'm actually trying to create a report to list out employees who have worked on holiday.
Probably there is other way to write this code that would be much better.
Hopefully my explanation is clear. Please help.
Thanks.
Regards,
Rocky
I have a table that looks like this:
Tablename: Dchkroll.dbf
Fieldname -> Name , Empno , D01, D02, D03, D04, D05, D06, ... , D29, D31
(D01 to D31 is referring to working days which holding working-hours for the day.)
I want to manipulate the D01-D31 (1 to 31 without the 'D') from the above table to compare it with 'HOLDATE' (DAY) value in the following table:
Tablename: Holiday.dbf
Fieldname -> Month , Holdate , Holdesp , PH
('HOLDATE' values is in DATE format)
The code that i'm trying to write is something like this:
[using do-while/for-next/scan-endscan to read from Dchkroll.dbf]
if the 1-31 of the D01-D31 fieldname is equal to day(HOLDATE) then
*store data into a cursor cursor_table_name (name, empno, holdate, hours)
end if
I'm actually trying to create a report to list out employees who have worked on holiday.
Probably there is other way to write this code that would be much better.
Hopefully my explanation is clear. Please help.
Thanks.
Regards,
Rocky