SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS - Code Reuse and Complex Control Flows


SSIS - Code Reuse and Complex Control Flows

Author
Message
Kristian Wedberg
Kristian Wedberg
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 53
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/kwedberg/ssiscodereuseandcomplexcontrolflows.asp
Kirk Haselden
Kirk Haselden
Mr or Mrs. 500
Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)Mr or Mrs. 500 (523 reputation)

Group: General Forum Members
Points: 523 Visits: 3

Nice article!

Universe.Earth.Software.Microsoft.SQLServer.IS.KirkHaselden


Jamie Thomson
Jamie Thomson
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2615 Visits: 188

Nice one Kristian. Reusability is key to the SSIS architecture. There's lots of possibilities in v1 with much more to come in v2 I'm *sure*!

-Jamie



Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
Kristian Wedberg
Kristian Wedberg
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 53
Thanks guys, glad you liked it!

Kristian
AndreQ1
AndreQ1
SSC-Enthusiastic
SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)

Group: General Forum Members
Points: 142 Visits: 1

It IS a very good article and a long time in coming. We've been able to stretch the DTS considerably with setting global variables. Never did get looping figured out in SQL 2000 so our solution? Cheat.

We had a stored procedure do the looping and then set the variables it needs through a temporary table, as below:

while ( @TName is not null )
begin
print 'TableName is ' + @TName

exec master..xp_cmdshell 'dtsrun /S"ServerName" /E /N"ReUsableDTSName"'

if @TName = @TNameLast break

set rowcount 1
select @TName = TableName
from LastUpdated
where TableName not in (
select TableName
from DenverStats )
order by TableName
set rowcount 0

end

It wasn't the most elegant solution, but it worked for getting the rowcounts for every table in the database of a remote Oracle schema. It takes a while to learn but global variables have saved me a lot of copy/paste. Thanks for bringing it up.

Andre


lucasm-630215
lucasm-630215
Valued Member
Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)

Group: General Forum Members
Points: 62 Visits: 39
I am attempting to use a for loop construct to pass a user variable into a script which will be used in the Select statement as a parameter. Reading your discussion helps me understand the for loop, but I don't see how I could pass a variable. Any thoughts or ideas?
Kristian Wedberg
Kristian Wedberg
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 53
It's not clear from your post where you're running the select; in script task, in execute sql task, or in data flow?
lucasm-630215
lucasm-630215
Valued Member
Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)

Group: General Forum Members
Points: 62 Visits: 39
Sorry Kristian,
I have data flows developed that execute the SQL in OLE DB Source objects. That is where the Parameter is located.

Mitch
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