You don't need LIKE, you can just use an = sign if you are not using any
wildcards. If you have a use for LIKE, you will have to escape the right
bracket with [[]:
Select *
from Musikdatei
Where m_Dateipfad LIKE REPLACE('C:\Xavier-Naidoo - Ich kenne nichts
[deutsche
version].mp3', '[', '[[]')
--
Jacco Schalkwijk
SQL Server MVP
[quoted text, click to view] "Eli" <elime4x@hotmail.com> wrote in message
news:d81274d5.0504180200.3a47ac44@posting.google.com...
> Hi all
>
> I am working on a mp3-Managment-tool with a SQL-Database.
> I got into troubles with a few files that have '[' and ']' in their
> filepathes or in any mp3-TagInfo.
>
> When I do some queries on these files e.g
>
> Select *
> from Musikdatei
> Where m_Dateipfad LIKE 'C:\Xavier-Naidoo - Ich kenne nichts [deutsche
> version].mp3'
>
> it doesn't seem to find anything at all (although the files in checked
> in in the database). The same problem I have with any artistname etc
> that have these special characters.
>
> How can I get around this? is there any key-command to tell SQL that
> '[' should be taken as '[' and not as any "functional character"?
>
>
> Thanks for any help!!!
>
> Eliane