Bug with LIKE?

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Bug with LIKE?

Re: Bug with LIKE?

by ZvezdanD » Sat Oct 26, 2013 3:58 am

Re: Bug with LIKE?

by trixmoto » Sat Oct 26, 2013 2:30 am

I'm working around this issue now with syntax like this...

Code: Select all

SELECT Songs.ID FROM Songs WHERE Songs.SongPath LIKE '%10%' AND Songs.SongPath LIKE '%The%' AND Songs.SongPath LIKE '%Blues%' AND Songs.SongPath LIKE '%Brothers%' AND Songs.SongPath LIKE '%B%' AND Songs.SongPath LIKE '%Movie%' AND Songs.SongPath LIKE '%Box%' AND Songs.SongPath LIKE '%Car%' AND Songs.SongPath LIKE '%Blues%'
It seems to work ok, although obviously the logic is a little different now, as the order of the parts is no longer correct.

Re: Bug with LIKE?

by trixmoto » Sat Oct 26, 2013 1:17 am

But this definitely used to work, this script would never have worked without that, nor would my RecreateM3U, or quite a few of my other scripts!

Re: Bug with LIKE?

by Mizery_Made » Fri Oct 25, 2013 4:48 pm

jiri wrote:MMW5 (rather early in the development atm)
:D

Re: Bug with LIKE?

by jiri » Fri Oct 25, 2013 9:13 am

The currently Like implementation hasn't been changed for quite a long time and yes, it's a little limited. We don't plan to change it atm, but MMW5 (rather early in the development atm) will probably support regular expressions, i.e. will be much more powerful.

Jiri

Bug with LIKE?

by trixmoto » Fri Oct 25, 2013 8:43 am

My "ImportM3U" script works by checking the path of tracks in the library against the paths in an M3U file. For example, this...

Code: Select all

SELECT Songs.ID FROM Songs WHERE Songs.SongPath LIKE '%\10%The%Blues%Brothers%B%Movie%Box%Car%Blues%'
...which should match with the path ":\Music\The Blues Brothers\Briefcase Full Of Blues (1995)\10_The Blues Brothers_'B' Movie Box Car Blues.mp3". This definitely used to work, but for some reason, it no longer is in the latest version (and maybe a few versions now). However, if I run this command...

Code: Select all

SELECT Songs.ID FROM Songs WHERE Songs.SongPath LIKE '%Blues%'
...then it does find this track. It looks like you can only have two "%" characters in a LIKE!? :-?

Top