Hi,

GROUP_CONCAT() is in 4.1. :-)


Matt


----- Original Message ----- 
From: "m.pheasant"
Sent: Wednesday, March 31, 2004 5:26 PM
Subject: RE: Is this possible?


> You would need an aggregate concat() function I think its in 5.0
> m
> 
> -----Original Message-----
> From: Chris Boget [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, April 01, 2004 7:08 AM
> To: MySQL
> Subject: Is this possible?
> 
> I have 2 tables (looks best in fixed width font):
> 
> test_items
> +-------+----------+
> | name  | rec_num  |
> +-------+----------+
> | Book  | 1        |
> | Game  | 2        |
> +-------+----------+
> 
> test_attributes
> +---------------+------------+
> | item_rec_num  | attribute  |
> +---------------+------------+
> | 1             | Thick      |
> | 1             | Tall       |
> | 1             | Green      |
> | 2             | Narrow     |
> | 2             | Yellow     |
> +---------------+------------+
> 
> How can I query the above tables so that if I select name and
> attribute, the result set comes out looking like this:
> 
> +-------+-------------------+
> | name  | attribute         |
> +-------+-------------------+
> | Book  | Thick/Tall/Green  |
> | Game  | Narrow/Yellow     |
> +-------+-------------------+
> 
> Because every join query I've been able to think of always
> returns the result set as follows:
> 
> +------+-----------+
> | name | attribute |
> +------+-----------+
> | Book | Thick     |
> | Book | Tall      |
> | Book | Green     |
> | Game | Narrow    |
> | Game | Yellow    |
> +------+-----------+
> 
> So my question, is it even possible to do what I'd like to do?
> 
> thnx,
> Chris


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to