0

I have a csv file that I'm loading into a database example of content of csv

"name","house,up a hill","drive"

I have set the column delimiter to be ", within the connection manager

which gives me data in 3 columns

column 1 =   "name 
column 2 = house,up a hill
column 3 = drive"

I need to then remove any " from any of the text in the three columns I have added Derived Column to my package and and added the following

REPLACE(column 1,'"','')

this hasn't worked, I thought the replace worked as column name, text to replace, replace with

any help would be appriciated

sql2015
  • 591
  • 3
  • 13
  • 34
  • DERIVED COLUMN uses double quotetation and not single. So use " and not ' when you write something in your derived column expressions – SqlKindaGuy Dec 11 '17 at 12:56
  • 1
    Possible duplicate of [How to replace double quotes in derived column transformation?](https://stackoverflow.com/questions/6210744/how-to-replace-double-quotes-in-derived-column-transformation) – SqlKindaGuy Dec 11 '17 at 12:56

1 Answers1

2

Write it like this in your derived column task

REPLACE( [COLUMNAME],"\"","")
SqlKindaGuy
  • 3,501
  • 2
  • 12
  • 29