July 8, 2010 at 10:54 pm
I'm running into small problem with my DATA Flow task.
My requirement is to populate one table from CSV source.
But the destination table (say mytable) has 5 column out of which 3 are filled by excel sheet and the other 2 are filled by query.
All the column in table are NOT NULL.
My query to populate other 2 cols looks like
select @muter = COUNT(duser), @status= dstatus from DUSER where DUSERNAME = 'administrator'.
i.e value of @muter and @status should be filled in those 2 cols of mytable.
Now in data flow I have CSV source and OLE DB as destination. BUt on Mapping I can only map 3 cols and the other 2 cols are left out.
How can map this to my OLE DB destination without having to play with table schema.
Any idea if this can be done in OLE DB command.
July 9, 2010 at 12:21 am
Use Derived Column transformation.
Csv Input --> derived column transformation --> OLEDB destination
July 9, 2010 at 12:25 am
how to write select col from table 1 in derived column editor?
July 9, 2010 at 12:39 am
Create two variables v1 and v2 and populate the values using SQL task.
There is an option in derived column (add as a new column). You can choose the values from these two variables. 3 input columns from CSV + 2 columns from derived column transformation. You can then import all the 5 columns to your OLEDB destination table.
Books online should help u.
July 9, 2010 at 1:36 am
Thanks.
It worked.
But now stuck with another derived column problem for date
July 11, 2010 at 5:40 pm
I am glad it worked 🙂
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply