Quantcast
Viewing all articles
Browse latest Browse all 4871

SQL replace not affecting all characters

I'm having an issue with SQL replace function. I'm pulling HTML description text from our website database to a csv file with a stored procedure and I'm pulling this field using this function to wrap the HTML code in double quotes, as well as escaping all the existing double quotes that may exist in the HTML data:

SQL
select'"'+replace(cast(tt.valueasvarchar(max)),'"','""')+'"'

but it seems to not affect all the double quotes in my results, as I have a few items that escape being all in one line in the CSV file, one example is this line:

Text
..."

Engineered to keep you comfortable and concealed, the Viper SD is Summit's most popular model and has been for 17 years. Featuring a foam-padded seat that can be raised for bow hunting and lowered for gun hunting, the Viper SD's full-perimeter frame allows for sit-down and stand-up...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>