Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss Content Posted by Tim Mitchell
»
Using the Script Component With Multiple...
14 posts, Page 1 of 2
1
2
»»
Using the Script Component With Multiple Outputs
Rate Topic
Display Mode
Topic Options
Author
Message
Tim Mitchell
Tim Mitchell
Posted Wednesday, April 15, 2009 12:06 AM
Ten Centuries
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 4:11 PM
Points: 1,033,
Visits: 2,593
Comments posted to this topic are about the item
Using the Script Component With Multiple Outputs
Tim Mitchell
SQL Server MVP
www.TimMitchell.net
twitter.com/Tim_Mitchell
Post #697265
Girish Bhat
Girish Bhat
Posted Wednesday, April 15, 2009 1:56 AM
SSC Veteran
Group: General Forum Members
Last Login: Friday, February 22, 2013 1:02 AM
Points: 206,
Visits: 425
Thanks for this tip. You have explained it really well in an easy to understand manner.
Girish
Post #697297
Jack Corbett
Jack Corbett
Posted Wednesday, April 15, 2009 6:19 AM
SSChampion
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:22 PM
Points: 10,571,
Visits: 11,871
Great article Tim. I don't currently have to work with anything like this, but it is a good overview of using the Script Component in addition to the tutorial on managing an indefinite flat file source.
Jack Corbett
Applications Developer
Don't let the good be the enemy of the best. --
Paul Fleming
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #697438
gau2902
gau2902
Posted Wednesday, April 15, 2009 9:40 AM
Forum Newbie
Group: General Forum Members
Last Login: Tuesday, July 20, 2010 9:19 AM
Points: 1,
Visits: 22
I agree with the solution but i would recommend another approach which is simpler and doesn't require any script component.
You can use
conditional split
to split the source data based on record type and have multiple destination for each record type.
Post #697657
Tim Mitchell
Tim Mitchell
Posted Wednesday, April 15, 2009 10:37 AM
Ten Centuries
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 4:11 PM
Points: 1,033,
Visits: 2,593
You're right that the conditional split could be used in some cases, but when you have outputs with differing numbers of columns, the script component would be ideal.
Tim Mitchell
SQL Server MVP
www.TimMitchell.net
twitter.com/Tim_Mitchell
Post #697721
Jeffrey Williams 3188
Jeffrey Williams 3188
Posted Wednesday, April 15, 2009 12:50 PM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Friday, May 17, 2013 11:21 AM
Points: 4,317,
Visits: 9,216
And what about the case when you have information in the header record that needs to be associated with the detail records? For example, if we have an employer group in the header record - and the detail records are the list of employees for the group.
I have worked with files where the group identifier only exists in the header record, but we need that identifier for each detail record.
I don't think that can be done with a conditional split - and using a script component will work handily.
Jeffrey Williams
Problems are opportunites brilliantly disguised as insurmountable obstacles.
How to post questions to get better answers faster
Managing Transaction Logs
Post #697825
mishaluba
mishaluba
Posted Sunday, April 19, 2009 4:47 PM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 5:54 PM
Points: 525,
Visits: 617
Thank you for the article! I have been doing a lot of SSIS work over the last 3-4 years including some pretty advanced stuff, but have never touched Script component. Your article made it look much less scary
. I am sure I will use these techniques sometime soon.
Post #700290
matty_p75
matty_p75
Posted Thursday, April 23, 2009 9:29 AM
Say Hey Kid
Group: General Forum Members
Last Login: Yesterday @ 6:40 AM
Points: 687,
Visits: 390
This is a good article for how to use a compenent that is very badly documented in Books Online and everywhere else. I used the Script Component transformation to "condense" a table that i could see was possible any other way. It took a lot of searching to find how to overwrite the appropriate subroutines and output to a new buffer, whch could subsequently be put into a table. I think that when there is a lack of documentation in this way people just don't use the component as they don't really know what it is for, which is a shame as it has its uses.
Post #703329
dpatel0501-696442
dpatel0501-696442
Posted Thursday, May 21, 2009 9:58 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, February 14, 2013 1:05 PM
Points: 103,
Visits: 133
So whats the right approach when we have records in the header as opposed to not having them in details?
Post #721470
psripuram
psripuram
Posted Thursday, August 05, 2010 1:37 PM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, September 16, 2010 10:41 AM
Points: 1,
Visits: 4
Can I have the same example shown in VB please
Thank you
Post #964674
« Prev Topic
|
Next Topic »
14 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.