I am using SSIS 2012, SQL Server 2012 both for source and destination.This is in regards loading a fact table.
I am using a Lookup and that Lookup table has values like.
storekey StoreNum PSLocationKey
923 14120 500
1753 14120 500
From the source I am Pulling StoreNum and Looking up using the StoreNum "ONLY" and returning StoreKey and LocationKey from the Lookup and loading it into the fact table. In the above case I want to load both the records from the lookup table as I am joining on StoreNum.But only the 1st record gets loaded.As if the second record does not gets considered at all. if I interchange the order of the records in the Lookup table only the 1st record from Lookup table gets considered.I did try using SQL in the Looup transformation and hard code using UNION ALL.Did try various cache options. Also tried Lookup Property Considering Duplicate records as error TRUE/FALSE.No effect.
I read a post [url=http://blogs.msdn.com/b/michen/archive/2008/06/07/lookup-multiple-rows.aspx][/url].But this dates back to year2008.
The other alternative I tried using multicast transformation and 2 looksup transformation.Each Lookup has 1 of the records and it works.I can see both the records in the pipeline.But what if there are 3 records or 4 records of such type.I cannot dynamically add Lookup transformation.
The only option for me is to use SQL Command and variables in source. But this defeats the purpose of SSIS.
Please sugesst me how can I implement this only with 1 Lookup transformation.