Combine several records into one record

Helge

New member
Local time
Today, 18:30
Joined
Jul 4, 2008
Messages
8
How can I combine several records in a table into one record?

Suppose that I have a table like Table1 in the attached image.
Then I want to combine all records with the same value for Key1 in one record.
The result is shown in Table2 in the attached image.

I would prefer to do it using SQL only, but I guess that this is not possible. Is it possible?
Alternatively I could accept to turn to VBA that could do it. Any good links about this?
 

Attachments

  • Tables.jpg
    Tables.jpg
    27.4 KB · Views: 97
Thank you for your answer, but I don't see how to do it. Could you please give details.

Investigate using a crosstab query.

You'll need two crosstabs to do what you require plus a third to combine the results
...
 
Hi CJ_London

After some tests in SQL I have decided to do it in VBA!:mad:
If you are interested in the VBA code, please send your e-mail address to hela(@)dtu.dk.
 

Users who are viewing this thread

Back
Top Bottom