skind56 wrote: 
> Think they both will do the same, i.e. include Asleep At The Wheel and
> Russo.
> A change to the existing query and a further subquery may be required to
> do what you wish, e.g:
> 
> exists ( (select * from tracks t2,genre_track,genres
>                                               where
>                                                       t2.id=tracks.id and
>                                                       
> tracks.id=genre_track.track and 
>                                                       
> genre_track.genre=genres.id and
>                                                       genres.name not in 
> ('Jazz','Rock'))
> 
> and not exists (select * from tracks t2,genre_track,genres
>                                               where
>                                                       t2.id=tracks.id and
>                                                       
> tracks.id=genre_track.track and 
>                                                       
> genre_track.genre=genres.id and
>                                                       genres.name in 
> ('Jazz','Rock')) )
> 
> Thinking of Russo as 2 entities, i.e. Russo Rock & Russo Classical, then
> the 1st select (exists) will exclude Rock but include Classical but then
> the 2nd select (not exists) will exclude Classical because it will find
> a Rock entity exists (if I’ve got my thinking right).

Many thanks for this! I'll have to spend some time with this. In time, I
may be able to understand it.



LMS 8 nightly; 3 Squeezelite players connected by powerline ethernet; 5
wireless players connected via Airplay Bridge; 1 SqueezeAmp player
no high-end or esoteric audio gear
1 Squeezebox Radio (upgraded UE Smart Radio) now mostly retired
------------------------------------------------------------------------
RobbH's Profile: http://forums.slimdevices.com/member.php?userid=67008
View this thread: http://forums.slimdevices.com/showthread.php?t=112872

_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to