[thelist] Selecting two distincts

Joel Canfield joel at spinhead.com
Mon May 6 10:15:01 CDT 2002


> Could you provide some more information as to the purpose and the
> (database) context of the queries.
>
> If e.g. you want separate list of the bands and genres two
> queries would be the best but if you want e.g. the bands and
> their appropriate genres they could/should be combined.

For each weblog entry, I have one or more genre, and one or more bands. I
need to list all genre and all bands for each log entry. Since there's a
many to many relationship between genre and logs, and bands and logs, there
are lookup tables called LogGenreTlk and LogBandsTlk between.

It's been suggested just to leave it as two queries, but I'd still be
interested in seeing code to write it as one, even if I don't use it *this*
time.

joel



More information about the thelist mailing list