Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Dynamic mapping issue
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

95 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.



Very Important crosS Applying yaK Herder

52326 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
Go to Top of Page
  Previous Topic Topic Next 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.02 seconds. Powered By: Snitz Forums 2000