Wicked.  Thanks David and Dennis!

And this works like a charm for all parents:

select f || ' ' || group_concat(t, ' ') from w group by f;

This pushes me up to a '2' on the SQL Guru Meter.

RW

SQLGuru-O-Meter |0-+--5----10|

Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dennis Cote
Sent: Monday, June 09, 2008 1:41 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] graph question

David Baird wrote:
> 
> Okay, just built SQLite 3.5.9 and group_concat does in fact work:
> 
>     select group_concat(t, ' ') from w where f=1;

You forgot the parent value at the beginning. Also, the OP may want to 
do this for several parents which can be accomplished by grouping the 
results.

   select f || ' ' || group_concat(t, ' ')
   from w
   where f in (1, 2, 3);
   group by f;

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

Reply via email to