Dear all
We have an existing database, supplied by the "door access" software vender.
It also has two fingerprint scanners [one indoor and one outdoor]
One of the tables in the database has
user ID
date with time
IN or OUT flag
Now, we need to prepare a report
1. Weekly summary report – Which shows 7 days records in 7 columns as landscape format with each column has two sub columns IN – OUT.
a. As a normal practice, users used to go out for some reason and will return during working hours and most of the times they use the scanner to enter the OUT and IN when they leave the office and return to office.
b. But sometimes they forget to scan or if scanner did not recognize the scan, as a result, they our record will not be exactly for every IN there is an OUT or every OUT there is an IN.
c. Normal working hours are 8AM to 5PM.
d. Format in each column [date] as 08:05 – 17:10 for the employees who came at 08:00AM and left 17:10 PM who did not leave the office during office hours
e. Format in each column [date] as (line -1) 08:05 – 11:24; (line -2) 12:46 – 13:15; (line -3) 14:00 – NULL ; (line -4) 14:34 – 15:11; (line -5) NULL – 17:00. The NULL values are the places where employee did not enter the scan.
f. At the bottom of each column, the total hours IN and total hours OUT of the office.
I need to design the query for the report, please assist me.
Thank you.
Jerome
We have an existing database, supplied by the "door access" software vender.
It also has two fingerprint scanners [one indoor and one outdoor]
One of the tables in the database has
user ID
date with time
IN or OUT flag
Now, we need to prepare a report
1. Weekly summary report – Which shows 7 days records in 7 columns as landscape format with each column has two sub columns IN – OUT.
a. As a normal practice, users used to go out for some reason and will return during working hours and most of the times they use the scanner to enter the OUT and IN when they leave the office and return to office.
b. But sometimes they forget to scan or if scanner did not recognize the scan, as a result, they our record will not be exactly for every IN there is an OUT or every OUT there is an IN.
c. Normal working hours are 8AM to 5PM.
d. Format in each column [date] as 08:05 – 17:10 for the employees who came at 08:00AM and left 17:10 PM who did not leave the office during office hours
e. Format in each column [date] as (line -1) 08:05 – 11:24; (line -2) 12:46 – 13:15; (line -3) 14:00 – NULL ; (line -4) 14:34 – 15:11; (line -5) NULL – 17:00. The NULL values are the places where employee did not enter the scan.
f. At the bottom of each column, the total hours IN and total hours OUT of the office.
I need to design the query for the report, please assist me.
Thank you.
Jerome