Click here to Skip to main content
14,550,550 members
Rate this:
Please Sign up or sign in to vote.
I have a table like this:

ID	InvoiceNo	            ProductName	            BarCode	  Quantity
7	SKYNET/RI/16-17/0008	SEAGATE 500GB INTERNAL	5VVEH00J	1
7	SKYNET/RI/16-17/0008	SEAGATE 500GB INTERNAL	9VVDK0BY	1
7	SKYNET/RI/16-17/0008	SEAGATE 500GB INTERNAL	5VVE4NMN	1


I want to represent it like this

ID	InvoiceNo	            ProductName	                              Quantity
7	SKYNET/RI/16-17/0008	SEAGATE 500GB INTERNAL S/N:5VVEH00J, 9VVDK0BY, 5VVE4NMN 3


Is there a way to do it in MSACCESS?? OR C#

What I have tried:

http://www.codeproject.com/Articles/21309/Get-comma-separated-result
Posted
Updated 22-May-20 23:31pm
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

The only way to get comma separated result in MS Access is to write custom VBA function and then to create query which uses that function. Fortunately, someone has done it before. Please see: Microsoft Access tips: Concatenate values from related records[^]
   
v2
Comments
JL Ruatpuia 2-Jun-16 13:08pm
   
Thank you..

But is there a way to do it in c#??
Maciej Los 2-Jun-16 16:04pm
   
Yes, you can achieve that by using C#, but you need to connect to the MS Access database, then get data by using Linq query.
Next 3 days i'll be bit busy. I'll promise to improve my answer in Monday. OK?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100