combine multiple rows into one

xcao

Registered User.
Local time
Today, 19:25
Joined
Nov 25, 2003
Messages
40
I have a table that has multiple rows for one employee.
I would like to combine them into one row.

For example

EmployeeID, Firstname, Lastname, plan description, plan Category
ID1, John, Smith, Delta dental, Single
ID1, John Smith, Life insurance, Basic
ID1, John Smith, Long term disablity, 2/3Salary
ID2, Mary, Olson, Delta dental, family,
ID2, Mary, Olson, Preferred one, Single.

I would like to put each employee into one row.
For example:
EmployeeID, Firstname, Lastname, plan description1, plan Category1,plan description2, plan Category2, plan description3, plan Category3


ID1, John, Smith, Delta dental, Single, lifeinsurance, Basic, longterm disablity, 2/3 salary.

How can I do it?

Thanks a lot
 
This is for using the record for mail merge.
Not for storage.

But when I look at the link you provide, it seems it's different with my case
 
It is, but as I said, it could be adapted. I assumed if you studied that and figured out how it worked, you'd be able to modify it as needed to handle multiple fields.
 
I have a table that has multiple rows for one employee.
I would like to combine them into one row.

For example

EmployeeID, Firstname, Lastname, plan description, plan Category
ID1, John, Smith, Delta dental, Single
ID1, John Smith, Life insurance, Basic
ID1, John Smith, Long term disablity, 2/3Salary
ID2, Mary, Olson, Delta dental, family,
ID2, Mary, Olson, Preferred one, Single.

I would like to put each employee into one row.
For example:
EmployeeID, Firstname, Lastname, plan description1, plan Category1,plan description2, plan Category2, plan description3, plan Category3


ID1, John, Smith, Delta dental, Single, lifeinsurance, Basic, longterm disablity, 2/3 salary.

How can I do it?

Thanks a lot

u can used query... used unique id (EmployeeID) relationship to combine the table.
 
I have a table that has multiple rows for one employee.
I would like to combine them into one row.

For example

EmployeeID, Firstname, Lastname, plan description, plan Category
ID1, John, Smith, Delta dental, Single
ID1, John Smith, Life insurance, Basic
ID1, John Smith, Long term disablity, 2/3Salary
ID2, Mary, Olson, Delta dental, family,
ID2, Mary, Olson, Preferred one, Single.

I would like to put each employee into one row.
For example:
EmployeeID, Firstname, Lastname, plan description1, plan Category1,plan description2, plan Category2, plan description3, plan Category3


ID1, John, Smith, Delta dental, Single, lifeinsurance, Basic, longterm disablity, 2/3 salary.

How can I do it?

Thanks a lot

Does the output you require have to be in individual flds (ie 9 for the example given) or can it be in 1 fld, with commas and spaces between each element. The 1st 3 flds can be easily combined with a Total ("Group By") select qry but the last 2 are the problem.

If all the data per ID can be put in 1 fld as I described above, then a fairly simple VBA prog can get you what you want, with the results written to a temp tble.
 
HI

Can you not try doing pivot in access to get the required result

Thanks and Regards
Gary
 

Users who are viewing this thread

Back
Top Bottom