Peter Haworth <p...@mollysrevenge.com>
wrote: 
> Given the following tables:
> 
> TABLEA
> KeyA,
> DataA
> TableBKey
> 
> TABLEB
> KeyB
> DataB
> 
> .. and a JOIN on TABLEA.TableBKey=TableB.KeyB
> 
> IS there a SELECT statement that returns TABLEA.KeyA,
> TABLEA.Data,AllDataB, where AllDataB consists of all the values of
> TableB.DataB strung together?

You are looking for group_concat (http://sqlite.org/lang_aggfunc.html):

select KeyA, DataA, group_concat(DataB)
from TABLEA join TABLEB on TABLEA.TableBKey=TableB.KeyB
group by KeyA;

Igor Tandetnik


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to