September 1, 2010 at 12:05 am
Comments posted to this topic are about the item Parsing an ADO result set into a comma separated string in SSIS
September 1, 2010 at 12:53 am
I would rather build the CSV using SQL at first place
September 1, 2010 at 6:41 am
I'm a bit torn on this one...
The article is nicely written with good clear graphics examples but I just wouldn't do this task this way. On the other hand, if you look deeper, there are some decent techniques shown that could be used for other things in the future.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 1, 2010 at 6:54 am
Hi There,
The reason we wanted to do this in SSIS was because we pull data from a lot of various sources in our data warehouse and instead of relying on SQL logic which could have varied by database server or version, I wanted to do this on our ETL side of things.
Thanks!
Garima
September 1, 2010 at 7:23 am
This is a good article, and your explanation as to why you did this in SSIS is a great example of how "best" practices sometimes are NOT the best solution for a particular business need.
hr_sn, I expect we'll see your article on how to do this in T-SQL soon? 😛
September 1, 2010 at 7:33 am
Jeff Moden (9/1/2010)
I'm a bit torn on this one...The article is nicely written with good clear graphics examples but I just wouldn't do this task this way. On the other hand, if you look deeper, there are some decent techniques shown that could be used for other things in the future.
I agree.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
September 1, 2010 at 11:50 am
Nice article and i would use the same technique in a DW environments when i have to pull information from different sources. But would be curious to see alternate methods to accomplish this, if any.
Thanks,
Amol Naik
September 1, 2010 at 1:33 pm
sknox (9/1/2010)
.... your explanation as to why you did this in SSIS is a great example of how "best" practices sometimes are NOT the best solution for a particular business need.
By no stretch of the imagination is the way this task was accomplished in the article the "best" way to do this even for "particular" business needs. I also state that "Business needs" should never stipulate "how" within the realm of data processing once the data is inside the server with the possible exception of what is required security wise.
Further, what business needs? The author simply stated "I recently had a need to build a package... " and that's quite far from anything known as a "particular business need".
--Jeff Moden
Change is inevitable... Change for the better is not.
September 1, 2010 at 1:53 pm
Jeff Moden (9/1/2010)
sknox (9/1/2010)
.... your explanation as to why you did this in SSIS is a great example of how "best" practices sometimes are NOT the best solution for a particular business need.By no stretch of the imagination is the way this task was accomplished in the article the "best" way to do this even for "particular" business needs. I also state that "Business needs" should never stipulate "how" within the realm of data processing once the data is inside the server with the possible exception of what is required security wise.
Further, what business needs? The author simply stated "I recently had a need to build a package... " and that's quite far from anything known as a "particular business need".
Hiya Jeff,
I hate to speak for someone else but I think what skonx may have referenced as my business need was based on my first reply. One thing that I do agree with is that this isn't necessarily the "Best" solution but as I mentioned at the start of my article, "I wanted to see if there were other ways to do simple programming using simple SSIS control flow components". This was more of an exploratory mission aiming to see what kind of fun things we can do with SSIS. It was a fun exercise that I thought was worth sharing. 🙂
Cheers,
Garima
September 1, 2010 at 6:53 pm
sknox (9/1/2010)
hr_sn, I expect we'll see your article on how to do this in T-SQL soon? 😛
There's already so many article available to create CSV using SQL and IMO no need of one more, you just need to use search on this site.
September 2, 2010 at 12:53 am
Hello,
try this select (this pivots rows to one string row):
select stuff((select top 10 ',"' + code + '"' from Products order by code for XML path('')), 1, 1, '');
April 9, 2013 at 10:08 am
Hi. I have tried to following your example posted here verbatim, however, whenever I execute my package it fails on the Execute SQL Task within the Foreach loop. I get the following error
"Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query ""SELECT '"+@[User::FileList]+","+@[User::MissingFi..." failed with the following error: "Incorrect syntax near '+'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Execute SQL Task"
What should I look for that I may have overlooked earlier?
My variables
name datatype value
sql_str String "SELECT '"+@[User::FileList]+", "+@[User::MissingFileName]+'" as FileList"
MissingFiles Object
MissingFileName String
FileList String
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply