Hi @yosafat saragih ,
We can store date and sql query in variables.
Then we can use variable in For Loop and set SQLSourceType as Variable in Execute SQL Task.
Please refer to the following links and pictures:
1.SSIS For Loop Container with Date Variable
2.Parameter SQL Insert into Statement SSIS Package
Best regards,
Mona
----------
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.