2017-12-20, 01:06
(2017-12-18, 10:39)DanCooper Wrote:(2017-12-18, 03:12)Toxic Man Wrote:LIKE is needed if you don't search by an exactly value. The "MoviePath" is always the full path a media file, so you have to use LIKE to list more than one movie. The % is equal to the * in a Windows Explorer search. So if your first path is "\\SERVER\Movies\Blockbusters" and your second one is "\\SERVER\Movies\Blockbusters from India" then my query will list boths.(2017-12-17, 18:49)DanCooper Wrote: SELECT * FROM movielist WHERE movielist.MoviePath LIKE "\\servername\folder\subfolder1%"
Excellent. This works, but is picking up movies that are also in \\servername\folder\subfolder2
Is that because of the operator LIKE being used in this query?
I don't know the real paths you want to filter, so it's a little bit difficult to say what's the correct query for you.
should work. Notice the additional \ before the %.sql:SELECT * FROM movielist WHERE movielist.MoviePath LIKE "\\servername\folder\subfolder1\%"