MySQL Forums
Forum List  »  Newbie

Complex Query
Posted by: Jack Wayne
Date: April 09, 2009 08:36AM

Hi,

I would like to write a query to select the values in one table and concatenate the results from a sub query, could someone point me in the right direction

table1
------
id
name

table2
------
id FK
title

table1
-------
1 Jack
2 John
3 Jayne
4 Juniper
5 jeff

table 2
-------
1 a
1 b
1 c
1 d
2 a
2 b
2 c

Results
----------
1, 'Jack', 1|a,1|b,1|c,1|d
2, 'John', '2|a,2|b,2|c'
3, 'Jayne', ''
4, 'Juniper', ''
5, 'Jeff', ''

Thanks
Jack

Options: ReplyQuote


Subject
Written By
Posted
Complex Query
April 09, 2009 08:36AM
April 09, 2009 09:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.