Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Oct 2002
    Location
    New Salem, North Dakota, USA
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    appending rows together (2003)

    I am working on a training database. The training table that has the information of Session_ID and Employee_ID..so multiple employees are in the table for multiple trainings. I am trying to create a query that will make one row of Employee Information...for example employee 00000, last name, first name, AerialClass, AerialPrac, CraneClass, CranePrac.....the training classes come from the same colum...how do I get them to be there own individual columns.....

    Thanks!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: appending rows together (2003)

    What exactly do you want to show? The names of the training coursed followed by each employee? Or do you want to show a grade or something like that?

  3. #3
    Star Lounger
    Join Date
    Oct 2002
    Location
    New Salem, North Dakota, USA
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: appending rows together (2003)

    I want to show the employee and then each class will be a column head, then in the field it will have a yes or no for attended.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: appending rows together (2003)

    This is done using a crosstab query.

    Start by creating a query in design view based on the training table, together with the employee table and the session table, joined on the appropriate fields.
    Select Query | Crosstab Query.
    Add the Employee ID field from the training table, then the last name and first name fields from the employee table (and other employee fields if needed), next the field from the session table that provides the session name. Finally, create a calculated column

    Count(*) > 0

    Set the Format property of this column (in the Properties window) to Yes/No.
    Set the Total option for the latter column to Expression (leave the rest as it is - the default Group By setting).
    Set the Crosstab option for the employee fields to Row Header, for the session field to Column Header and for the calculated column to Value.
    Switch to datasheet view to see the result.

  5. #5
    Star Lounger
    Join Date
    Oct 2002
    Location
    New Salem, North Dakota, USA
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: appending rows together (2003)

    Thanks for the help...it works awesome!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •