October 20, 2010 at 7:46 pm
I want to create an ssis package to query our db and output to a text file. It would be run for different clients. The query would be the same, but some of the column names may change depending on the client. Is there a way to set the names of the columns dynamically - maybe inside of a script task?
Thanks.
October 20, 2010 at 9:18 pm
You might want to look at utilizing the OpenRowset function to write the data to the file instead.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 20, 2010 at 10:49 pm
Within a Dataflow task the metadata (column names/column count) cannot change at run-time. If you work with the same column count but the source has a different name with the same data-type, you could just use the query to change that column name to a standard name.
You could also handle it with a script task.
Come to think of it CozyRoc has a Data-Flow Plus component that might be able to do what you are talking about.
CEWII
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy