You should check out the "Genre is Blues or Rock" mask in the "Filter Examples" folder. Here are several advices:molnium wrote:Has anybody an idea what my problem is...? Maybe i have just a typo, or something else?
1. The OR operator is logical, not string. You cannot write 'xxx' OR 'yyy'. Well, you could write, but you will not get what you want. So, instead of Genres.GenreName Like '%Blues%' OR '%Rock%' you should write Genres.GenreName Like '%Blues%' OR Genres.GenreName Like '%Rock%'. Your first mask works correctly just because you have '%Blues%' on the first place. If you change order of listed genres, e.g. Genres.GenreName Like '%Chicago Blues%' OR '%Blues%', then this mask will not work as you want either.
2. The OR operator has lower precedence than AND operator (similar to + and * operators). So, in your case, instead of xxx OR yyy AND zzz you should write (xxx OR yyy) AND zzz.
3. You don't need to use Genres.GenreName SQL field and Songs.ID = GenresSongs.IDSong AND GenresSongs.IDGenre = Genres.IDGenre conditions. It is enough to use <Genre>, the script will create automatically all necessary conditions.
4. Genres.GenreName (i.e. <Genre>) is the field which contains just single item from the Songs.Genre (i.e. <Multi Genre>) field. So, you don't need to use the escape characters (%) in strings, i.e. instead of <Genre> Like '%Blues%' you could write <Genre> = 'Blues'. If you have multiple choices, then instead of e.g. <Genre> = 'Blues' OR <Genre> = 'Rock' you could write <Genre> IN ('Blues', 'Rock'). In that way the mask would be shorter and probably faster.
5. If all your Electronic tracks contain that word in the multi-item genre, e.g. 'Electronic; Abstract', ''Electronic; Acid', 'Electronic; Acid House' and so on, then the simplest way to display such tracks is to write <Multi Genre> Like '%;Electronic%'. If your tracks contain some another genre with such word which you don't want to have included, then you should write something like '; ' || <Multi Genre> || '; ' Like '%; Electronic; %'.
6. If all your tracks contain main genre on the begin of the multi-item genre and styles (sub-genres) after it, then instead of using one Group with bunch of masks/nodes for each main genre, maybe it could be better if you use Split qualifier. Just take a look at the "Genres and sub-genres" mask in the "Split examples" folder.