i have two input tables:
1) Site:
site_id|| site_name|| site_location
1000 || abc || XYZ_123
1001 || tyu || ERD_123
1002 || iok || FTR_678
1003 || okn || YHU_987
1004 || ybg || OLP_008
1005 || qwe || PLM_126
2)
product:
Product_id|| product_name||start_date||end_date
212 || sme1 ||2014-12-25||2017-03-13
250 || try1 ||2013-12-15|| 2017-03-13
267 || inu1 || 2015-03-27|| 2017-03-17
I need to check how many times the id is repeated and order it like the output table.
this is my output table structure :
Id|| site_id|| product_id|| previous_id|| start_date|| end_date
1 || 1000 ||250 || null || 2015-01-01||2017-03-13
2 || 1001 ||250 || 1 || 2014-12-25||2015-01-01
3 || 1002 ||250 || 2 || 2013-12-15||2014-12-25
4 || 1003 ||267 || null || 2015-03-27|| 2017-03-17
5 ||1004 ||212 || null || 2016-01-01||2017-03-13
6 || 1005 ||212 || 1 || 2014-12-25||2015-12-30
i have added a new column using dervied column for PreviousID but to map the previous PreviousID with the ID column i am unable to figure out a way. I used the lookup transformation to lookup the values of Site_id and product_id but i am making some mistake and i am unable to figure out that mistake.
i am using visual studio 2010.
any help is appreciated.