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 + "' ";
Loading
VasanthPosted Apr 8, 2010, 4:40 AM
String_Replace(
If it helps you , please mark as answer.
Paul LeFrancoisPosted Apr 7, 2010, 12:18 PM
Cheers!
Paul
VasanthPosted Apr 7, 2010, 12:14 PM
UPDATE my_table SET my_column = REPLACE(my_column ,'"', ' ')
Here don't use where clause for double Quotes.
If it helps out , please mark as answer