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

Combining records

P: n/a
I have a database table like the following:

id|name|item_id|sequence

and the following instance data:

1|Apple|419841|1
2|Orange|419841|2
3|Banana|935890|1
4|Lime|959081|1

I need to create a new table where all rows that have the same item_id
(Apple and Orange) are combined.

So the output I need would be :

1|Apple AND Orange|419841|1
3|Banana|935890|1
4|Lime|959081|1

Thank you in advance!

Mike

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Combining records with the same Item_Id in a table is the wrong thing to do.
Leave it as it is and combine the records in a query where you need them
combined.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"mike" <ru****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a database table like the following:

id|name|item_id|sequence

and the following instance data:

1|Apple|419841|1
2|Orange|419841|2
3|Banana|935890|1
4|Lime|959081|1

I need to create a new table where all rows that have the same item_id
(Apple and Orange) are combined.

So the output I need would be :

1|Apple AND Orange|419841|1
3|Banana|935890|1
4|Lime|959081|1

Thank you in advance!

Mike

Nov 13 '05 #2

P: n/a
PC Datasheet, thanks for the advice. However, that is precisely what I
am trying to do. I was mistaken to say "I need to create a new table".
I should have said, "I need to create a SQL query in Access 2003
where..."

Thanks!

Mike

Nov 13 '05 #3

P: n/a
I am still in need of solution to this problem. Is there more
information that I could provide to make this easier?
Thank you very much!

Mike

Nov 13 '05 #4

P: n/a
mike wrote:
I have a database table like the following:

id|name|item_id|sequence

and the following instance data:

1|Apple|419841|1
2|Orange|419841|2
3|Banana|935890|1
4|Lime|959081|1

I need to create a new table where all rows that have the same item_id
(Apple and Orange) are combined.

So the output I need would be :

1|Apple AND Orange|419841|1
3|Banana|935890|1
4|Lime|959081|1


search keyword: query concatenation.

http://www.mvps.org/access/modules/mdl0008.htm might help, too.

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.