By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

Merge Data into one feild

P: 17
Hello,

I have another access question.

I have a table and there are record that I want to merge into one field.

Example: (Before)

Field1 Field2
Owner 1 Product A
Owner 1 Product B
Owner 2 Product A
Owner 3 Product A
Owner 4 Product A
Owner 4 Product B
Owner 4 Product C

I want to have a results where
Owner 1 Product A + Product B
Owner 2 Product A
Owner 3 Product A
Owner 4 Product A + product B + Product C

The Field 2 data is a sperate table

Please advise how to do it.

I learning a lot here. .thanks for your help.

Many Thanks
Aug 15 '07 #1
Share this Question
Share on Google+
3 Replies


P: 7
First of all if this was excel you'd use the Concatenate command; however, you can do it much easier in Access.

Create a query of the table with the 2 fields. Bring in both fields.

Create an expression and simply use "&" to concatenate strings.

Example:

Field 1 Field 2 Expr: [Field 1]&[Field 2]

one two onetwo
three four threefour

If you need spaces do the following: & " " &
use quotation marks with spaces.
Now you can make a table from your query if needed.

You need to have field data side by side for this to work.
Looks like you may need to make a query based on 2 tables and a subquery.
Aug 16 '07 #2

P: 17
Hi SwamyKarthik,

Thanks for the reply. However I still have problem and I hope you can assist me.

Let me try to explain a bit detail

I have 2 table which linked to each other

The outcome of the query is

Field1 Field2
ProjectA ProductA
ProjectB ProductA
ProjectB ProductB

I want to have a table that will store this query with

Field1 field3
ProjectA ProductA
ProjectB ProductA ProductB

Which instead of showing 2 row of Project B, it will only show 1 Project B, but the Field 3 will store both Product A + Proudct B

hope this explain and looking forward for your assistant

Cheers
Raymond




First of all if this was excel you'd use the Concatenate command; however, you can do it much easier in Access.

Create a query of the table with the 2 fields. Bring in both fields.

Create an expression and simply use "&" to concatenate strings.

Example:

Field 1 Field 2 Expr: [Field 1]&[Field 2]

one two onetwo
three four threefour

If you need spaces do the following: & " " &
use quotation marks with spaces.
Now you can make a table from your query if needed.

You need to have field data side by side for this to work.
Looks like you may need to make a query based on 2 tables and a subquery.
Aug 16 '07 #3

P: 5
WooHoo! Works great. Only two more questions. (Other postings)
Aug 29 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.