How can I replace ” with " in a mysql Query?
Posted
by vamsivanka
on Stack Overflow
See other posts from Stack Overflow
or by vamsivanka
Published on 2010-04-02T18:32:45Z
Indexed on
2010/04/02
18:53 UTC
Read the original article
Hit count: 171
I am trying to run this SQL from ASP.NET 2005 but am getting an invalid SQL error because it has a weird character ”
in it.
In my code I am trying to replace ”
with "
but it is not doing it as the special character in the replace command is changing to "
.
Query:
insert into userquery(description)
values ('In fact, Topeka Google Mayor Bill Bunten expressed it best: “Don’t be fooled. Even Google recognizes that all roads lead to Kansas, not just yellow brick ones.”')
If I copy and execute this in mysql it is working good.
How can I solve this problem?
© Stack Overflow or respective owner