﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 General Discussion  / Removing commas and quotes from numeric fields in csv file using SSIS / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 04:24:17 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Removing commas and quotes from numeric fields in csv file using SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1232977-149-1.aspx</link><description>Grasshopper,I know this is an old thread.  but I am hoping you can help me out. SSIS is new to me and I am having a hard time with it.  I have a  CVS file with multiple columns, I only need data from 4 columns.Some columns look like this:Linux File System-ALL,ALL,ALL,ALL"the , causing issues for me during the import to SQL.  as it reads the wrong column data.I tried your code but it didn't work for me.REPLACE(REPLACE(Column,",",""),"\"","") My column name is Client; what would the expression look like?Thank you</description><pubDate>Wed, 15 May 2013 17:46:32 GMT</pubDate><dc:creator>juan Munoz</dc:creator></item><item><title>RE: Removing commas and quotes from numeric fields in csv file using SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1232977-149-1.aspx</link><description>Thank you all for replying. Making the following changes solved the issue:1. Setting Text Qualifier of Flat File Connection Manager to ".2. Using REPLACE(REPLACE(Column,",",""),"\"","") in Derived Column Transformation.</description><pubDate>Wed, 11 Jan 2012 18:24:36 GMT</pubDate><dc:creator>khushboo.dudani</dc:creator></item><item><title>RE: Removing commas and quotes from numeric fields in csv file using SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1232977-149-1.aspx</link><description>I'd normally bring the file in as all text fields not caring about the format then running sql against the data for format or format in a view/procedure and load from that into the target table. In that way its easier to create an error table with any rejected records for data formats not acounted for.</description><pubDate>Wed, 11 Jan 2012 05:04:22 GMT</pubDate><dc:creator>Carolyn Richardson</dc:creator></item><item><title>RE: Removing commas and quotes from numeric fields in csv file using SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1232977-149-1.aspx</link><description>[quote][b]khushboo.dudani (1/10/2012)[/b][hr]But it is not working.[/quote]How is it not working?  Error message?  What is the error message?  Data not transformed as you expected?  How [i]is[/i] the data being transformed?  Also, what expression are you using for your derived column?  Have you set it to replace the original column, or to be added as a new column?John</description><pubDate>Wed, 11 Jan 2012 04:28:20 GMT</pubDate><dc:creator>John Mitchell-245523</dc:creator></item><item><title>RE: Removing commas and quotes from numeric fields in csv file using SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1232977-149-1.aspx</link><description>Hello,you can try to do it in Excel before loading data into SQL Server.For instance, copy this text and create a new csv file:a;1234.5;bbbbbaa;"1,234.5";bbbbaaa;1234.5;bbbaaaa;1234.5;bbaaaaa;1234.5;bWhen you open this new file with Excel, the cell B2 has format "Number". If you the second column to format "General" and save the file, all data in the second column will take the same appearance.Francesc</description><pubDate>Wed, 11 Jan 2012 04:00:43 GMT</pubDate><dc:creator>frfernan</dc:creator></item><item><title>Removing commas and quotes from numeric fields in csv file using SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1232977-149-1.aspx</link><description>I am creating SSIS package which reads data from a csv file and stores in SQL Server database. There are a few numeric fields in the csv files. They sometimes contain value like [b]"1,008.54"[/b]How do I remove the quotes and comma from the value?I have successfully separated the rows with this kind of data by using [b]Conditional Split Transformation[/b]. (SUBSTRING([Column 9],1,1) == "\"")After this, I tried using [b]Derived Column Transformation[/b] to REPLACE comma and quotes with empty string. But it is not working.Please advise.Thanks!</description><pubDate>Tue, 10 Jan 2012 01:45:39 GMT</pubDate><dc:creator>khushboo.dudani</dc:creator></item></channel></rss>