Re: escaping character in sql statements
Bob Horrobin <[email protected]> Thu, 25 Oct 2007 20:06:17 +0100
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Message-ID | <[email protected]> |
Mark,
My experience is mainly Oracle but it may help. I would expect you to
have to include the ' in quotes i.e. '''.
If I read your statement correctly I would expect something like the
following to work.
select * from files where location = '\\\\\\\\192.168.0.100\\\\clients\\\\o'''orielly\\\\file%'
It gets more interesting if you want to find two quotes (''). You will have to experiment.
Good luck Bob
Mark Mchugh wrote:
>Hi,
>I am writing an sql to retrieve data relating to certain files in a folder from my database. Some times part of the data may contain a ' character.
>
>here's an example of the sql
>
>select * from files where location = '\\\\\\\\192.168.0.100\\\\clients\\\\o''orielly\\\\file%'
>
>
>this recults returns no records from my database, even though there are records there. the records are path + file names, thats why i have to use the \ charater to escape them, this does not seem to like me using ' to escape the ' character, any ideas?
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>
>
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/[email protected]