I have a table in access which contains two fields, the first field is ids to some products and the second field is ids to the parts used to make the product. So, the product id can be listed more than once. I need to make a query which gives me unique product ids in one field and part ids separated by "," in second field. Any Ideas on how to do it? Thanks in advance.
Asked
Active
Viewed 59 times
0
-
can you share your table structure, and how far have you gotten with your initial attempts? – StackExchange What The Heck Apr 10 '15 at 13:21
1 Answers
0
Using Ado concat:
SELECT [Id],
ConcatADO("SELECT [PartId] FROM MYTABLE
WHERE [Id]=" & [Id],", "," : ") AS Parts
FROM MYTABLE
GROUP BY [Id], 2;

Ali Sheikhpour
- 10,475
- 5
- 41
- 82
-
Check other solutions here http://stackoverflow.com/questions/12427975/concatenate-multiple-rows-in-one-field-in-access – Ali Sheikhpour Apr 10 '15 at 14:00