November 29, 2010 at 12:04 am
I am trying to create a task of data import, my case is :
Taking POrderID from ORDERS table, and searching it in MAINORDERS table and fetch all the records that match the POrderID and once the match is found, I insert the result set to ORDERDETAILS table.
Need a advice on how to perform this task.
Thanks
November 29, 2010 at 1:38 am
i am asuming that you need to insert the records from mainorders table to order details table based on the poderif in the order table.
you can achive the same using the look up transformation task insde the dataflow task
1) one oledb datasource to connect to main order table
2) in the look up transformation you need a reference table, in this case it is your order table.
3) you need to select the Look up column in your column tab, here it will be your porderid
4) you need oledb destination to write the result set to the orderdetails table.
but here you need to think of rows which didn't found any lookup, you configure it using error configuration to ignore or to redirect to some othere table.
you can actually achive the entire thing using Execute sql task if you can write a query.
November 29, 2010 at 1:57 am
Thanks buddy,
actually I am in process of writing Cursor for the mentioned task, but was thinking to do it with the Task(s).
will try the steps that you have mentioned.
cheers.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply