Merging rows with a common field value

Robbie1974

New member
Local time
Today, 22:02
Joined
Mar 31, 2005
Messages
8
I have a table with the following fields:

productid
productdescription


It is filled like this:

productid productdescription

AAA1123002 Papierklemmer
AAA1123002 Papierklemmer
AAA1123002 SMILE / SMILEY / PAPIERKLEM
AAA20014 Printrollen houtvrij 60g/m² rollengte 44m wit (50)
AAA20014 37mmxD70mmxK12mm
AAA20014 <li>Telmachinerol is houtvrij, diameter 70mm, breedte 37mm,
AAA20014 wit<br/><li>Kern 12mm en de lengte van de rol is 44 meter.
AAA20014 <li>De verpakking is onderverdeeld per 5 stuks
AAA20014 Printrollen houtvrij 60g/m² rollengte 44m wit (50)
AAA20014 PRINTERROL / TELROL / TELMACHINE ROL / 37X70X12
AAA20014 PST03707012W0
AAA20014 Bobine pour caisse enregistreuse
AAA20030 Telmachinerol 57x68x12mm 40m 60g/m² wit (50)
AAA20030 <li>Rolbreedte 57mm, diameter 68mm, kern 12mm en
AAA20030 rollengte 40m.
AAA20030 <li>Vervaardigd van houtvrij papier.
AAA20030 Telmachinerol 57x68x12mm 40m 60g/m² wit (50)
AAA20030 KASSAROL / TELROL / 507-023 / PST05706812W0

and so on.

Now I like to merge the productsdescription field with a <BR> tag in between where the productid is the same.


Is this possible, because I tried several things and did not find a solution.

Thanks for any help that can help me on the road.
 
You can do it in a query with a user-defined function.

I have attached a database containing your sample data. You can run the query (or run the report to view the contents of the query.)

The mergeDesc() function used in the query is in Module1.
.
 

Attachments

Last edited:
Jon K said:
You can do it in a query with a user-defined function.

I have attached a database containing your sample data. You can run the query (or run the report to view the contents of the query.)

The mergeDesc() function used in the query is in Module1.
.


Works perfect. Thanks for your help. I had made a solution in excel, but it was too slow.


You're the best, thanks
 

Users who are viewing this thread

Back
Top Bottom