Creating Query with a single line per employee

milkman2500

Registered User.
Local time
Today, 14:42
Joined
Oct 21, 2012
Messages
45
Hi,

I currently have a database that has the following tables:

t_Employees
t_Cost_Centers
t_Changes

The [t_Changes] tracks what cost centers the employee is in with a start date and end date:

Change_ID
Employee_ID
Cost_Center_ID
Start_Date
End_Date

I want to run a query that will show a single line per employee, and different columns for each of the cost centers the employee was in. If the employee was in 3 different cost centers, the query would have 4 columns (1 for the employee, 1 for the first cost center, 1 for the second cost center, 3 for third cost center).

I saw another thread to linked to a concatenate example by Allen Browne, but that places multiple values in a single cell. I want different columns per cost center.

Thanks for your help.
 
Hi,

Yes I do want a crosstab query, however the "values" are text and rather than summing or counting them, I want to display the individual value as text. Is there a way to do this?

Thanks.
 

Users who are viewing this thread

Back
Top Bottom