layout of output

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table as follow

Product Servic
1
1
1
2
2
2 1

How can I create a query that will retur

Product Service_attache
1 ,4,5,
2 ,4,9,1

Is it possible

Thanks
 
Hi,


Create a table to get the result:

SELECT DISTINCT Product, iif( false, ' ', Null) As Concat INTO temp
FROM tableName


Next, update the field concat:


UPDATE temp INNER JOIN tableName ON temp.Product=tableName.Product
SET concat = (concat + "," ) & Service



The result is in your table temp.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top