Converting multiple records (rows) into one record (row) using a unique identifier

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spyldbrat
    New Member
    • Jul 2015
    • 2

    Converting multiple records (rows) into one record (row) using a unique identifier

    I very new to using Access. I am using Access 2007. I am trying to create a Query that shows an employee's weekly scheduled on the same row. I am importing the schedules from Excel which show each employee's work date on separate rows:

    Example:

    EXCEL IMPORT:

    Code:
    EE #	EE Name	Day of Week	WorkDate	Hours	InTime	OutTime	Lunch
    18264	Jane Doe	Monday	06/22/15	6	8:00	14:30	0.5
    18264	Jane Doe	Tuesday	06/23/15	6	8:00	14:30	0.5
    18602	Jason Thomas	Monday	06/22/15	8	16:00	23:59	0
    18602	Jason Thomas	Sunday	06/21/15	8	16:00	23:59	0
    17529	John Smith	Monday	06/22/15	4	17:00	21:00	0
    17529	John Smith	Sunday	06/21/15	11	10:00	21:30	0.5
    18509	Mary Harris	Monday	06/22/15	6	9:00	15:00	0
    18509	Mary Harris	Sunday	06/21/15	6	11:00	17:00	0
    18509	Mary Harris	Tuesday	06/23/15	6	11:00	17:00	0
    How I need the Query to read:

    Code:
    EmployeeNumber	EmpName	Sunday	Sunday Date	Hours	InTime	OutTime	Lunch	Monday	Monday Date	Hours	InTime	OutTime	Lunch	Tuesday	Tuesday Date	Hours	InTime	OutTime	Lunch
    18264	Jane Doe							Monday	06/22/15	6	8:00	14:30	0.5	Tuesday	06/23/15	6	8:00	14:30	0.5
    18602	Jason Thomas	Sunday	06/21/15	8	16:00	23:59	0	Monday	06/22/15	8	16:00	23:59	0						
    17529	John Smith	Sunday	06/21/15	11	10:00	21:30	0.5	Monday	06/22/15	4	17:00	21:00	0						
    18509	Mary Harris	06/21/15	6	11:00	17:00	0		Monday	06/22/15	6	9:00	15:00	0	Tuesday	06/23/15	6	11:00	17:00	0
    I am hoping to post in the correct columnar format. Please help.

    Thank you.
    Last edited by Rabbit; Jul 2 '15, 04:42 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    So if I understand correctly, you are looking for a calendar layout with the weekdays as the header-row and the employee information as the first column?

    Start with a crosstab query:
    Make summary data easier to read by using a crosstab query
    Once setup, you go to the table area in design view, right click, properties, column headers, enter the correct names.

    You should read thru Allen Browne's Crosstab query techniques before you get started.

    If you get stuck... post back!

    Comment

    Working...