Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Parsing an ADO result set into a comma separated string in SSIS


Parsing an ADO result set into a comma separated string in SSIS

Author
Message
Garima Sharma
Garima Sharma
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 82
Comments posted to this topic are about the item Parsing an ADO result set into a comma separated string in SSIS
hr_sn
hr_sn
SSC-Enthusiastic
SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)

Group: General Forum Members
Points: 188 Visits: 383
I would rather build the CSV using SQL at first place
Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45450 Visits: 39946
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

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Garima Sharma
Garima Sharma
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 82
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

http://edw.northwestern.edu
sknox
sknox
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2043 Visits: 2714
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? :-P
Alvin Ramard
Alvin Ramard
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2678 Visits: 11590
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.



Alvin Ramard
Memphis PASS Chapter

All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

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
AmolNaik
AmolNaik
SSC Eights!
SSC Eights! (969 reputation)SSC Eights! (969 reputation)SSC Eights! (969 reputation)SSC Eights! (969 reputation)SSC Eights! (969 reputation)SSC Eights! (969 reputation)SSC Eights! (969 reputation)SSC Eights! (969 reputation)

Group: General Forum Members
Points: 969 Visits: 1234
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
Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45450 Visits: 39946
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

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Garima Sharma
Garima Sharma
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 82
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
hr_sn
hr_sn
SSC-Enthusiastic
SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)

Group: General Forum Members
Points: 188 Visits: 383
sknox (9/1/2010)
hr_sn, I expect we'll see your article on how to do this in T-SQL soon? :-P


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


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search