Solved

Strip field of commas before inserting into database

Posted on 2011-03-03
5
712 Views
Last Modified: 2012-05-11
Hello.
I have a SSIS process which sorts through csv files and text files. Within my process, the source files are within a loop.  I have stored procedures that cleans up the data once it is inserted into the database.  I have a problem with one of the columns, called “Title”.  I noticed that there are times that this column has multiple commas, which means it is not being parsed correctly.   I believed it was because as my delimiter is a comma, once the comma is recognized, the data is inserted into its appropriate column.  I want all commas stripped from this field.   I thought that I could use a derived column within my data flow task, which would actually be  from the CSV file source to the derived column and then to the multicast. Is there a way that I can remove all commas from this field before it is inserted into the database?   There are thousands of files each day that will be processed.   SSIS Process- Derived Column
0
Comment
Question by:ayoZen
  • 3
  • 2
5 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
ID: 35028817
0
 

Author Comment

by:ayoZen
ID: 35029078
Thank you Icohan for your comment.  Is the derived column the right route to take or is there a different task I should use to perform this action (before I go to the outside tool component)?
0
 
LVL 39

Expert Comment

by:lcohan
ID: 35029294
Not mandatory but I would read the file in and use a different task if possible and if derived does not work.
0
 

Author Comment

by:ayoZen
ID: 35030459
Right.  Ok.  I think that's my issue, which task  prevent the field from being improperly parsed?
0
 

Author Closing Comment

by:ayoZen
ID: 35057956
Per your suggestion Icohan, I used the Replace in Files tool,http://www.freedownloadscenter.com/Utilities/Text_Search_and_Replace_Tools/Replace_in_Files.html,  which was pretty efficient.  I didn't need to revise my dtsx project either.

Thank You.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help with a query 3 48
Incremental load example 2 54
SQL Express connecting form remote error 26 7 45
Selection from table2 where criteria for table1 10 46
If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question