Avatar of DatabaseDuane
 asked on

Gathering data into single field

I need to export data from Access that goes into a spreadsheet that aggragates many items into one field. It would take data like this:

CustomerID PayID  Date  Amount
3455     47  1/1/2010 $10
3455     99  7/1/2011  $90
5544     54  6/5/2010 $25

and creates one long text field displaying the records like this:

Customer ID   Text
3455               1/1/2010  $10, 7/1/2011 $90
5544              6/5/2010  $25

It will allow for single line excel record viewing.

Any suggestions how to build a table or create a query that aggragates the data?
Microsoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon

Use the & to concatenate fields
SELECT [CustomerID], [PayID] & [Date] & {Amount] as Text
FROM DataTable

Open in new window


Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

This is an incredibly elegant solution. Thank you.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.