• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 314
  • Last Modified:

dynamic ssis

I need to build a SSIS package that will run different queries based on user input from a stored proc.. The proc is called prPriceList and uses the variable @PriceListName.. If someone calls the proc and puts through the name WholeSale then an SSIS package wil run and grab the results of that stored proc if someone puts through Retail than the SSIS package will run grab those results and output an Excel file.. What is the best way to do this? We use VB 2008 here as well as SQL Server 2008 and Visual Studio 2008
1 Solution
In visual studio 2008 and select new project under intergration service.and In control flow task select Execute sql task and select your procdeure and pass input parameter.
if you have queries,let me know.

Alpesh PatelAssistant ConsultantCommented:
in SSIS Create one variable and pass value to this outside the package.

Get one SQL Script task and create SQL Statement usign expression in that use variable to append the filter.

cheryl9063Author Commented:
How do you pass a variable to SSIS and get it to run.. This is what I dont understand..I know about the ? mark thing in a query.. But my boss wants me to give him a stored proc that he can use in a VB app or something and then make the SSIS package run from that I guess... I mean how do people normally do this dynamically? If for example the user passes in green the SSIS runs one way, if the user passes in red the SSIS package runs another.. IMPORTANT.. My question is how do you get the variable to SSIS? NOT how do you except an input variable FROM outside..
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

You can  use the script task to get variable values .
And using precendence constraint to check values.

cheryl9063Author Commented:
I dont know how to use a script task.. Can you post an example?
Jason Yousef, MSSr. BI  DeveloperCommented:

How would your users run that?
What kind of access you'll give them?
How many different paths the package should go, only 2 as you described above?

The best way of you ask me, and the neat way is to give them a SSRS report, you could control the access easily, nice graphical interface for them to enter the paramters, then it'll call the SSIS package and pass the paramter.

Let me know which way you want to go and answer my above questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now