Solved

Strip field of commas before inserting into database

Posted on 2011-03-03
5
695 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now