question

sam21 avatar image
sam21 asked

SSIS Execute SQL Task Set date

I want to achieve this through Exec SQL Task in SSIS Control flow. Please suggest select MAX(EFF_DT) As EFF_DT FROM Table D (nolock) WHERE MONTH(D.EFF_DT) = month(datediff('m',-1,@eff_dt)) and year(d.eff_dt) = year(datediff('m',-1,@eff_dt)) and assign the result to a variable..
ssistsql
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
the_SQL avatar image
the_SQL answered
You can set the result of a SQL query to a variable by indicating your result set in the general page of the Execute SQL Task Editor. You will need to set the ResultSet property correctly, and then map the result set to your variable on the Result Set page.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sam21 avatar image sam21 commented ·
Thank you!! Worked..
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.