471,874 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,874 software developers and data experts.

Another row value to columns question

48
Hello!

I have an access table filled with 10k records that look like this:

Product Car
601945 Vauxhall Astra
602117 Peugeot 806
602117 Peugeot Expert
602117 Citroen Dispatch
602227 Vauxhall Vectra B
602227 Opel Vectra B

I want it to look like this:
Product Car
601945 Vauxhall Astra
602117 Peugeot 806, Peugeot Expert, Citroen Dispatch
602227 Vauxhall Vectra B, Opel Vectra B

So putting the car models in one comma seperated column for each productcode that is the same. Now I have seen a lot of posts like this but I can't find the solution. Can you help me please?

Thanks! Sander
Nov 18 '15 #1

✓ answered by NeoPa

Hi Sander.

Please let me start by saying that what you propose is a very bad idea indeed. This leads you towards a way of storing data that will be clumsy and very difficult to work with. On the other hand, displaying the data that way, just as one might in MS Excel, may well be very reasonable. For more on this see Database Normalisation and Table Structures.

The link (Listing Items Within GROUP BY Set) will help you to form a query that handles providing data in the format requested. You can use the concept to display or export the data, just as you can to save it and store it. I strongly recommend you avoid doing the latter but I'll leave it with you anyway.

1 734
NeoPa
32,468 Expert Mod 16PB
Hi Sander.

Please let me start by saying that what you propose is a very bad idea indeed. This leads you towards a way of storing data that will be clumsy and very difficult to work with. On the other hand, displaying the data that way, just as one might in MS Excel, may well be very reasonable. For more on this see Database Normalisation and Table Structures.

The link (Listing Items Within GROUP BY Set) will help you to form a query that handles providing data in the format requested. You can use the concept to display or export the data, just as you can to save it and store it. I strongly recommend you avoid doing the latter but I'll leave it with you anyway.
Nov 18 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

74 posts views Thread by Michael | last post: by
1 post views Thread by Krissy | last post: by
11 posts views Thread by Sweety | last post: by
5 posts views Thread by WebBuilder451 | last post: by
reply views Thread by BStone | last post: by
9 posts views Thread by beginner | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.