In the Lookup Transformation , I specify a reference data set to use as follow:
SELECT DISTINCT Client_ID
FROM dbo.CLIENT
WHERE (ENROLLMENT_DATE >='2016-07-01') AND (DE_ENROLLMENT_DATE <='2017-06-30')
If I want to replace the hard-coded '2016-07-01'
and '2017-06-30'
, does anyone know how I can do it? Thank you for your help.
You can use expressions to achieve this, just follow these steps:
@[User::strBeginDate]
and @[User::strEndDate]
) of type stringDataFlow Task
and press F4
to show the properties Tab[Lookup Transformation].SqlCommand
Use the following expression
"SELECT DISTINCT Client_ID
FROM dbo.CLIENT
WHERE (ENROLLMENT_DATE >='" + @[User::strBeginDate] + "') AND (DE_ENROLLMENT_DATE <='" + @[User::strEndDate] + "')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With