How to push the filtered data into data flow task in SSIS?

I need to push the filtered data into data flow task... In the control flow task I have 2 'execute SQL task' and one Data flow task connected one after the other. HOW can I use the output result set of the Execute sql taks into the data flow ? The two 'execute sql task' performs filter operations and is running fine while debugging.

Inside the datflow task I use a source OLEDB ? What shall I use as a source to get the filtered output data from SQL task in Control Flow...
Gowtham RamamoorthyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gowtham RamamoorthyAuthor Commented:
I need to get the recent data into the data flow task.. How could this be achieved... I not sure whether if we connect the sql task with the data flow will implicitly allow the filtered data into the data flow,, can someone guide me on this please...
Vikas GargAssociate Principal EngineerCommented:
Hi,

I think you can write the same query which you wrote in the Execute SQL task to the Data source of the Data Flow Task.
Gowtham RamamoorthyAuthor Commented:
But I use a variable in that SQL task in control flow?? when i tried with the same query its throwing the error...?
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Vikas GargAssociate Principal EngineerCommented:
You can also use a variable in Oledb source.

What error are you getting ?

Can you share the screenshot ?
Gowtham RamamoorthyAuthor Commented:
Attached Screenshot
ErrorScreenShot.png
Gowtham RamamoorthyAuthor Commented:
I tried not using  (User::)  but again an error occurs stating 'Invalid Column name'
Vikas GargAssociate Principal EngineerCommented:
Hi,

You have to write like this

Select * from table Where col1 > ?

and then go the parameter tab where you can map with referenced parameter.

SSIS Map Parmeter in DFT

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gowtham RamamoorthyAuthor Commented:
Awesome got worked..Thanks a lot Vikas....
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.