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)
 Dynamic mapping issue
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mmkrishna1919
Yak Posting Veteran

India
94 Posts

Posted - 04/19/2013 :  02:36:12  Show Profile  Reply with Quote
Hi All,
i have a stored procedure it will generate an result set with dynamic number of columns.

we have dynamic sql's in SP the number of columns in result set will depend on some conditions inside SP.

with few input values SP result set will return 10 columns
with few other input values result set will return 30 columns

Pls suggest the way how can i map these columns in SSIS dynamically.

Thanks.


M.MURALI kRISHNA

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 04/19/2013 :  02:43:44  Show Profile  Reply with Quote
you cant change the metadata of SSIS at runtime. One option is to keep resultset as fixed (30 columns always). in first case put NULL or some default values for the missing 20 columns as placeholders. then based on your condition apply the proper mappings to take only the available columns

------------------------------------------------------------------------------------------------------
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.05 seconds. Powered By: Snitz Forums 2000