June 19, 2007 at 12:59 pm
Hi
I am trying to transfer my Informatica/Oracle skills to the SSIS world for a quick effort. I can accomplish this in Informtica by altering my source Sql and adding Oracle ROWNUM to the selection list.
I need to populate a column in the table with the value of the sequential row number. This column does not exist in the Source table but a column exists in the target table. How do I generate this column with values 1,2,3...n for each of the row being inserted into the target table using SSIS transformations.
Thanks
Krishna
June 20, 2007 at 2:11 am
You could either use an Identity column in the SQL table, or use the Row Number component in SSIS. Both will give you a sequential number which you can seed.
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!
June 20, 2007 at 8:53 am
What Row Number component? All I am aware of is the Row Count task and it only give the total row count after the task completes AFAIK. The only way I have been able to add a row count in a data flow is to use a script task and increment a script variable and assign that value to an output.
Tim
Denver, CO
June 20, 2007 at 9:01 am
Sorry.
Go to http://www.SQLIS.com and download it free.
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!
June 20, 2007 at 9:27 am
Thanks for the replies.
Since I cannot alter either the source table or the target table to add/change column/properties, I ended up creating a temporary table with Identity column and used that generated value to populate the target table. Unnecessarily complex but works.
June 20, 2007 at 10:00 am
I would not use that. Creating a temp table for the sake of a a SK it serious overkill and will kill performance.
Simply install the row number component and use that. So much easier and quicker
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!
June 20, 2007 at 1:46 pm
Thanks again for the response.
But would like to stick with Identity column on the temp table for now. Downloading and installing Misc components would create more need for migration requests/justifications/approvals for Production and would like to stay away from all that for this quick effort.
June 20, 2007 at 2:24 pm
There are many ways to do something, and then the right way.
Your way works but will not scale very well. The overhead it causes is unnessasary. To be frank, it's not an elgent solution
That's my ten cents worth
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!
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply