SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Single variable across multiple packages
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

reidkell
Starting Member

USA
12 Posts

Posted - 09/12/2013 :  12:12:30  Show Profile  Reply with Quote
I have four separate import processes that, perhaps out of ignorance, I created in four separate SSIS packages. Each package calls a stored proc GetNewBatchNum(), which writes a row to tblBatch, retuning the new BatchID.

My problem is, I now want all four packages to use a single BatchID, not four different ones. How do I call my GetNewBatchNum proc once, then use the returned value for each import package? Any information appreciated.

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 09/12/2013 :  16:01:16  Show Profile  Reply with Quote
you could create a master package where you can move the execute proc step. Add a variable inside that to store the returned value. Then use four execute package tasks to call your current four packages. Inside child packages add a variable to get batchid and set the value using parent package variable configuration to received the value from the variable created in master package.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000