Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Access (https://www.askmehelpdesk.com/forumdisplay.php?f=441)
-   -   Query regarding converting column to row in MS Access (https://www.askmehelpdesk.com/showthread.php?t=66896)

  • Feb 27, 2007, 07:02 AM
    sonalthakker
    Query regarding converting column to row in MS Access
    Hello,

    I have table in MS Access as bellow
    Name Date Time In_Out
    X 25/1/07 09:00 AM IN
    X 25/1/07 12:00 PM Out
    X 25/1/07 01:00 PM IN
    X 25/1/07 07:00 PM Out
    Y 25/1/07 12:00 PM IN
    Y 25/1/07 06:00 PM Out
    .

    I want to convert it as bellow


    Name Date T In T Out T In T Out
    X 25/1/07 09:00 AM 12:00 PM 01:00 PM 07:00 PM
    Y 25/1/07 12:00 PM 06:00 PM


    Can any one help me?

    Thanks in advance

    Sonal
  • Feb 27, 2007, 07:10 AM
    ScottGem
    Your data is in a normalized setup. So you don't want to convert the actual data. Are you just trying to create a report or what?
  • Feb 27, 2007, 07:31 AM
    sonalthakker
    Yes ScottGem your are right. I am trying to generate report.

    Thanks a lot
  • Feb 27, 2007, 07:35 AM
    ScottGem
    I would suggest that you would be better off using grouping then to try setting up the columns like you wanted. If you group on Employee then date, You will have an easy to read report of time in and out.

    If you really feel you need the columna format, try using a cross tab query. Set the times as the columns and Employee and Date as the Rows.

  • All times are GMT -7. The time now is 08:03 PM.