Re: Replace string query - double trouble!
Giuseppe Maxia wrote:
[replace double quotes in strings]
>
> You need one more double quote to escape it:
> UPDATE `tableName` SET `fieldName` = REPLACE(fieldName,"""","")
Additionaly it is worth noting, that using double quotes as string
delimiter is an extension of MySQL. The SQL standard uses double quotes
for identifiers. MySQL can be configured in both ways, thus using double
quotes can cause one or the other behavior.
The best practice should be to always use single quotes for strings.
UPDATE `tableName` SET `fieldName` = REPLACE(`fieldName`,'"','')
Greetings
Kai
--
This signature is left as an exercise for the reader.
|