TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Paul LeFrancois
NA
3
0
How to find and replace double quotes?
Apr 6 2010 4:42 PM
Hi All,
Here's my dilemma. I am trying to create a data cleansing app that looks at a single column in a Sybase db and replaces double quotes " with a space.
Here is my current code (which obviously isn't working).
Any ideas?
Many thanks.
---------------
string
strSql =
string
.Empty;
string
find =
""";
string
replace =
" "
;
strSql =
"DECLARE @patfind varchar(255)"
+
"UPDATE my_table SET my_column = ltrim(rtrim(STUFF( my_column,PATINDEX( '"
+find+
"', my_column),"
+
"DATALENGTH( '"
+ find +
"' ),'"
+ replace +
"' ))) WHERE email LIKE '"
+ find +
"' "
;
Reply
Answers (
3
)
How do I handle a situation that needs to destroy an object in C#?
automatically script out job