May 9, 2011 at 11:15 am
Hi,
I am working on a task to transfer the source table data into proper destination tables in SSIS. At one point I have collected the new data (after redirecting the existing rows to other flow, to be updated) with 'Multicast' (ex: consists of FN, LN), I have calculated next sequence number by aggregate data flow (by count(*) from the target table). Now I need to combine these two (count(*), FN, LN) in to destination table. Please let me know how to do this. Instead aggregate data flow is there any way to find the next available sequence number and combine to the data in multicast then load to destination table with columns CID, FN, LN?
May 9, 2011 at 11:40 pm
You can combine flows in the dataflow using the UNION component.
But why are you calculating the next sequence number? Can't you use an IDENTITY constraint in your destination table?
If this is not possible, I would use a script component in .NET to keep track of sequence numbers, instead of the aggregate transformation.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 10, 2011 at 7:49 am
Thank you so much for your response. I can't use UNION as I am not trying to combine same kind of data (Id in one and names in other one). I tried to make use of IDENTITY but, it doesn't always take the immediate available value, it follows the history (deleted in past) and then take the next available value. I tried to use script component but no idea exacly how to update a table from this componenet. I appreciate if you give any sample code. Thanks a lot.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply