?
Solved

Strip field of commas before inserting into database

Posted on 2011-03-03
5
Medium Priority
?
739 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 40

Accepted Solution

by:
lcohan earned 2000 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 40

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

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 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 this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

770 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