I have a Hotel table.
create table DimHotel
(
Hotel_ID int Identity(1, 1),
HotelName nvarchar(max)
)
Now i get some feeds as HotelNames
, now our business logic is use Hotel_ID
for existing HotelName and create new record for HotelName which is new and use newly generated Hotel_ID. Now I understood that I can direct "Lookup No Match Output" to OLE DB Command Transformation but then how i get newly generated key.
One option is do one more lookup on DimHotel table (I guess this is stupid, scanning a table twice). What other option do we have.
I can use but Merge statement but our ETL team wants to avoid hand coding.