February 12, 2012 at 8:23 am
hello every one,
I have the requirement to transform .csv file to oledb destination but i need to add the new column before i transform the data into oledb, the column should take the values either default unique value or some sort of ordered values like say 1,2,3......
i did tried by using derived column but i couldn't reach the target. help me out
February 12, 2012 at 10:35 am
Derived column sounds like the way to go. What do you mean "couldn't reach the target"? Can you give more detail about what you want the deriived column to contain?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 12, 2012 at 5:44 pm
say for example i have employee table in .csv file and want to transform it by adding new column which should contain unique id for each employee,
February 12, 2012 at 11:19 pm
You Can use script component and variables to generate SNo.
February 12, 2012 at 11:40 pm
31 Days of SSIS – Generating Row Numbers (23/31)[/url]
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 13, 2012 at 3:56 am
i did tried to use script task but as i am new to ssis couldn't find the way to solve it, is any one there to elaborate on this please
February 13, 2012 at 4:00 am
naiduvamsi467 (2/13/2012)
i did tried to use script task but as i am new to ssis couldn't find the way to solve it, is any one there to elaborate on this please
The blog post I linked to has code samples.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
February 13, 2012 at 4:05 am
If you're not comfortable with Script Tasks then you can insert into a staging table. Write a stored procedure to populate a unique value column, (probably using ROW_NUMBER), and then insert the whole lot into your destination table.
John
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply