August 20, 2008 at 12:54 pm
Hi I'm new to SSIS.
I need suggestions in order to find a solution to the above question.
I have two flat file sources and need to replace part of text in one flat file with all text in second flat file.
Soren
August 20, 2008 at 1:04 pm
If I were using SSIS, and since I'm reasonable new at SSIS, I would load both files into SQL tables and then generate a new file from these 2 tables.
However, I believe you should be able to do this in the dataflow. You should be able to split each file to isolate the parts you want then merge the needed data from both files into a file. I haven't done anything like this yet so I cannot go into more details at this time.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
August 20, 2008 at 1:13 pm
You _could_ do this in ssis but it seems more a job for an application though.
There needs to be more info provided though as to what you want to do. Some sample data would be good.
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
August 20, 2008 at 1:20 pm
I agree with Crispin. That's why I started my reply with "If were using SSIS...".
I'd much rather to this in VB.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
August 20, 2008 at 1:23 pm
okay here comes an example
flat file 1:
a
b
c
a unique string, identifying start block to be replaced
aaaa
bbbb
cccc
....
....
....
a unique string, identifying end block to be replaced
a
b
c
Flat file :2
replace with this block
aaaa
bbbb
cccc
end block
August 20, 2008 at 1:28 pm
Not a job for ssis. You could do it but it would be a convoluted way. Look at using VB / c#. You could do that from within ssis even.
Not a job for the data flow task though.
btw, how big is file1?
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
July 8, 2010 at 9:35 am
Soren-543040 (8/20/2008)
okay here comes an exampleflat file 1:
a
b
c
a unique string, identifying start block to be replaced
aaaa
bbbb
cccc
....
....
....
a unique string, identifying end block to be replaced
a
b
c
Flat file :2
replace with this block
aaaa
bbbb
cccc
end block
Hi Soren
There is a tool called Conditional Split under Data Flow Transformations in the tool box, connect that to your flat file source and then to the destination.
Then you can use the conditional split to filter your records, in the Conditional Split Transformation Editor you will see 3 columns (order,Output name, Condition). output name will be a name that you give for your filter (any name), Condition will be your filter (RecordType =="10") where recordType is a name of a Column in my data that I want to insert in a SQL Server.
Bests
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply