venerdì 17 agosto 2012 07:38
i have an excel as source now i want to load data based on below condition
if the year is previous year it should loop for 12 times and if it is current year it should loop for 8 times
pls can any one suggest me the way
Tutte le risposte
venerdì 17 agosto 2012 07:55
1) Create a temporary staging table for your excel source.
2) In a data flow task, read data from the excel source and load it to this staging table
3) Have two loop containers, one running 12 times and the other 8 times. In the first for loop container, select data from this staging table (using a OLE DB source) where the year column is equal to previous year. In the second for loop container, select data from the staging table (using a OLE DB source) where the year column is equal to current year.
venerdì 17 agosto 2012 10:12
I would also suggest you to create a staging table that has all the data from your excel and then apply loop on it by reading the date column.