Use the String. replaceAll() method to replace single with double quotes, e.g. const replaced = str. replaceAll("'", '"'); . The replaceAll method will return a new string where all occurrences of single quotes are replaced with double quotes.
set @AssetDescr= 'This has quotes at 6". ' The use of an SSIS variable can be used for the " character and that will allow the replace to function correctly. Thanks, it worked.
Ensure your Text qualifier is set to " – this will remove the quotes around your fields. As we have no headers in the file, untick the “Column names in the first data row” checkbox. Preview the file to ensure it looks OK.
chr(34) is the character code for a double quote. You could also use replace(mystring, """", "") that """" gets evaluated as one double-quote character, but I believe the chr(34) is much less confusing.
I have flat file. I am loading data from flat file to source table using ssis.And one of the column has following values:
<Somecol1 =""1"" col1values= ""223,567,890,653"">
I want following column output:
<Somecol1 ="1" col1values= "223,567,890,653">
I have tried to replace in derived column.
REPLACE( COLA, "\"","\")
but this doesnt work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With