In a SSIS package , I need some sort of condition that include two connections.
The simplified problem is:
A simple CSV import to SQL Server, DB1, table 1( col1, col2 ).
I need to populate table 1 > col2 = '1' if col1 is found in another database , DB2 > table 2 ; db2 is specified as a different connection in package.
and table 1 > col2 = '2' if col1 is not found in the lookup database.
any guidance is appreciated,
ta
Best Answer
Put the CSV import in one data flow, then in a dependent data flow use an OLE DB Source that contains the results you need as the output of a SQL query. Feed that into an OLEDB destination.
Your query would look similar to: