Need help with declaring and setting a value to varibale in SSIS

NickK 176 Reputation points

hi experts... need help in setting a value to variables in SSIS( scope =packag)

I want to declare and set 3 variables like below so I can use in endpoint url

  1. fromdate = getdate
  2. fromdate2= get last 2 hours of data
  3. fromdate2= getdate()-1 ( -1 day of data)

I declared 3 variables, but I am having a hard time setting the values mentioned above

as of now, I am hard coding to get the values from the endpoint URL

kindly please help

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,508 questions
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,596 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 25,726 Reputation points

    Hi @NickK ,

    You have three main options to assign a dynamic value to a SSIS variable:

    • SSIS Expression Task.
    • SSIS Script Task.
    • SSIS Variable Expression.
    0 comments No comments

  2. ZoeHui-MSFT 34,996 Reputation points

    Hi @NickK ,

    About Integration Services (SSIS) Variables, here is an official documentation for your reference.


    You may also refer the 3rd article for more details.



    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues October

    0 comments No comments