Eureka!!! I found it!
select *
from [dbo].[TRS_Trans_For_EY_Incl_Wire_Info_20131004]
where 'TRS-' + [Transaction_Type_Cd]
NOT IN (
select [trans_type_cd]
from [dbo].[tb_transaction_type]
where [cust_indicator] = 'I')
Question
I am using a following query with hardcoded datasource name in my OLE DB source of SSIS package wherefrom I am pulling certain types of rows.
select *
from mtb.dbo.TRS_Trans_For_EY_Incl_Wire_Info_20131004 AS src
where 'TRS-' + src.Transaction_Type_Cd
NOT IN (
select dtp.trans_type_cd
from mtb_etl.dbo.tb_transaction_type AS dtp
where dtp.cust_indicator = 'I')
My question is how can I use a standard query (instead of a hardcoded one) to pull the data so it can work well for various datasources?
No correct solution
OTHER TIPS
Eureka!!! I found it!
select *
from [dbo].[TRS_Trans_For_EY_Incl_Wire_Info_20131004]
where 'TRS-' + [Transaction_Type_Cd]
NOT IN (
select [trans_type_cd]
from [dbo].[tb_transaction_type]
where [cust_indicator] = 'I')