Here is a post where I actually did to pass variables into SQL query using Execute SQL task. Here is my condition that I need to count number of rows in one table and need to pass this count value into a variable and then using that variable I need to insert into a table. For this Purpose let me take a table named 'Dim' under Database 'test' and similarly I will take one more table called 'fact' under database name 'test' again. Using SSIS, I will take Execute SQL task on workspace, In fact two as we need two executions has to be done. Let us create a variable as we discussed earlier of this task purpose and I'm creating a variable called "testing". Right click on first Execute SQL task, go for edit and here, I will configure as shown in snippet below. Here importantly we need to set ResultSet as Single row as ResultSet option will activate Result Set tab of Execute process t...