I have a table with 2 to 4 lines of data per each employee. I need to pull this information from a vertical list of data in the table into a horizontal list in a query...per employee name. Can this be done and if so...how?
Below is a sample of my table. I need to seperate the 4 times so that I can calculate them for payroll.
ID Date and time Time Event message Card number User name
1 5/4/2007 7.06.00 AM 7.06.00 AM 1 15:23566 Aguilera- Juan
2 5/4/2007 10.10.00 AM 10.10.00 AM 0 15:23566 Aguilera- Juan
3 5/4/2007 10.39.00 AM 10.39.00 AM 1 15:23566 Aguilera- Juan
4 5/4/2007 3.05.00 PM 3.05.00 PM 1 15:23566 Aguilera- Juan
5 5/4/2007 7.02.00 AM 7.02.00 AM 0 22:60053 Arreola- Guadalupe
6 5/4/2007 12.06.00 PM 12.06.00 PM 1 22:60053 Arreola- Guadalupe
7 5/4/2007 12.37.00 PM 12.37.00 PM 0 22:60053 Arreola- Guadalupe
8 5/4/2007 3.04.00 PM 3.04.00 PM 1 22:60053 Arreola- Guadalupe
You can do virtually anything with code, but for your purposes, it sounds like sorting the records by user name is fine. Apply multiple sorts in a SELECT QUERY. Sorts are ordered from left to right. Criteria is the name in the field you want to filter.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.