Hi Mike, sorry, i don't fully get it. However, a single SQL statement can not return data rows of different structure as you indicated in your example. Especially, I am confused about "blank". It seems to come from Table A, same as "Group *". Do you want to put "Group *" as a sort of headline, but not "blank" ?
Martin Mike Yenco wrote: > Ok, I guess this list doesn't support image attachments. Let's see if > I can sort of illustrate what I'm looking to do in text without > requiring 1000 words. > > Table A > blank | Group 1 | Code 1 > blank | Group 2 | Code 2 > blank | Group 3 | Code 3 > > Table B > Item 1 | Code 1 > Item 2 | Code 1 > Item 3 | Code 1 > Item 4 | Code 2 > Item 5 | Code 2 > Item 6 | Code 3 > Item 7 | Code 3 > Item 8 | Code 3 > Item 9 | Code 3 > > > Looking for a way to get a result something like below where a search > of Table B for items containing some particular text will return the > data in a format like this: > > Group 1 > blank | Item 2 | Code 1 > blank | Item 3 | Code 1 > Group 3 > blank | Item 7 | Code 3 > blank | Item 9 | Code 3 > > > -Mike > > > On Mar 1, 2009, at 11:57 AM, Mike Yenco wrote: > > >> Is there a way that SQLite can return all matching items to a search >> string in Table B, but return a group name from Table A before each >> set of matching items within the result? (see attached image). >> >> >> _______________________________________________ >> 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 > > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users