April 23, 2013 at 7:56 pm
Hi,
I am creating an ssis package to remove tab's from the source flat file and send it to destination flat file.
In control flow i used data flow task in data flow i used source flat file, connected it to the source flat file on my desktop.
used derived column transformation, in the expression i used TRIM function but it is trimming the spaces too.. i want spaces in the column.
Please help!!
April 24, 2013 at 11:00 am
Have you tried using Replace?
April 24, 2013 at 11:20 am
yes i tried it by using expression replace([column 0],"/t"," ") dint work.
Thanks
April 24, 2013 at 11:21 am
sorry i used this "\t"
April 24, 2013 at 11:34 am
shrsan (4/24/2013)
sorry i used this "\t"
Are you sure it is a horizontal tab ("\t")? Sounds like it might be another white space character. I'd through in a column in the derived column or columns transform that use FINDSTRING() to find out what type of characters are in the source column for real. Something like:
FINDSTRING("\t", column, 0) > 0 ? "Tab Found" : "No Tab Found"
You could do a new column for the most common whitespace characters or nested IF's, or you could use a script task and use .NET to find what characters are really there and do the replace using .NET.
Finally you could get the SSIS RegEx transform and use it, http://www.sqlis.com/post/Regular-Expression-Transformation.aspx
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply