View Full Version : Query Help: Grouping like rows


woknick
03-10-2008, 12:16 PM
I have a table that has 2 colums.


Room_Number Items
1 Chair
2 Chair
2 Desk
3 Table
4 Computer
4 Radio
4 Book
4 Chair
6 Fish Tank
6 Chair


I want a query that will select rooms 1-6 and include all items for those rooms on one row. Example below


Room_Number Items
1 Chair
2 Chair, Desk
3 Table
4 Computer, Radio, Book, Chair
6 Fish Tank, Chair


I hope this makes sense. Thank you in advance.

pbaldy
03-10-2008, 12:20 PM
http://www.mvps.org/access/modules/mdl0004.htm

Though watch out, as I just found out there's a typo in the sample SQL. There should be a space before the word "FROM".

woknick
03-10-2008, 01:33 PM
Would you be able to provide my with an example of how to implement this fuction for my example?

pbaldy
03-10-2008, 06:00 PM
It's pretty much cut and paste, replacing with your object names. Why don't you give it a try and post back if you get stuck?

namliam
03-11-2008, 03:05 AM
Another idea could be to use a crosstab query?