How to remove double quotes surrounding the text while importing a CSV file?

后端 未结 4 1064
死守一世寂寞
死守一世寂寞 2021-01-04 23:24

I have data which resembles the following:

\"D.STEIN\",\"DS\",\"01\",\"ALTRES\",\"TTTTTTFFTT\" 
\"D.STEIN\",\"DS\",\"01\",\"APCASH\",\"TTTTTTFFTT\" 
\"D.STE         


        
4条回答
  •  抹茶落季
    2021-01-05 00:07

    while loading CSV with double quotes and comma there is one limitation that extra double quotes has been added and the data also enclosed with the double quotes you can check in the preview of source file. So, add the derived column task and give the below expression:-

    (REPLACE(REPLACE(RIGHT(SUBSTRING(TRIM(COL2),1,LEN(COL2) - 1),LEN(COL2) - 2)," ","@"),"\"\"","\""),"@"," ")

    the bold part removes the data enclosed with double quotes.

    Try this and do let me know if this is helpful

提交回复
热议问题