![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a DTS package that extracts data from a Sybase 11 datasource into a holding table in SQL Server 7 using a data-pump. The Sybase data-source is meant to return something in the region of 1million records. Because of a large date range from the query in Sybase, even putting it into a Stored Procedure isn't much help, and we have little choice but to re-run the Stored Procedure in Sybase multiple times for smaller date range. How could I do this dynamically? The Data source is something like EXEC p_dataExtractor 20010101,20050331 I want to reduce the date range and called it multiple times. I know I can do something like the following to change the DataSource's SQL ' Get a handle Set oCustomTask = oPackage.Tasks( "DTSTask_DTSDataPumpTask_1").CustomTask sSQL = oCustomTask.SourceSQLStatement 'Call SetDateParams to subsitute templated date parameters with actual date parameters SetDateParms sSQL, _ DTSGlobalVariables( "gvStart_dt").Value, _ DTSGlobalVariables( "gvEnd_dt").Value) oCustomTask.SourceSQLStatement = sSQL But what can I actually do to repeat the process &/or to re-wire the process (rather than having a long chain of static sequential pumps)?? |
#3
| |||
| |||
|
|
Just had an idea but not sure how this would work. Can I use the Workflow Properties->Active-X Script's Main Function to alter the task to get it to re-run (and change the date-parameter from within the Workflow's VBScript)? Currently, the parameters are set in a task prior to the data-pump task. "Patrick" <patl (AT) reply (DOT) newsgroup.msn.com> wrote in message news:eshCD$DTFHA.3332 (AT) TK2MSFTNGP15 (DOT) phx.gbl... I have a DTS package that extracts data from a Sybase 11 datasource into a holding table in SQL Server 7 using a data-pump. The Sybase data-source is meant to return something in the region of 1million records. Because of a large date range from the query in Sybase, even putting it into a Stored Procedure isn't much help, and we have little choice but to re-run the Stored Procedure in Sybase multiple times for smaller date range. How could I do this dynamically? The Data source is something like EXEC p_dataExtractor 20010101,20050331 I want to reduce the date range and called it multiple times. I know I can do something like the following to change the DataSource's SQL ' Get a handle Set oCustomTask = oPackage.Tasks( "DTSTask_DTSDataPumpTask_1").CustomTask sSQL = oCustomTask.SourceSQLStatement 'Call SetDateParams to subsitute templated date parameters with actual date parameters SetDateParms sSQL, _ DTSGlobalVariables( "gvStart_dt").Value, _ DTSGlobalVariables( "gvEnd_dt").Value) oCustomTask.SourceSQLStatement = sSQL But what can I actually do to repeat the process &/or to re-wire the process (rather than having a long chain of static sequential pumps)?? |
#4
| |||
| |||
|
|
Here is a quite a simple example that demonstrates looping- How to loop through a global variable Rowset (http://www.sqldts.com/default.aspx?298) Darren Green http://www.sqldts.com http://www.sqlis.com "Patrick" <patl (AT) reply (DOT) newsgroup.msn.com> wrote in message news:%23F5GxBETFHA.2096 (AT) TK2MSFTNGP14 (DOT) phx.gbl... Just had an idea but not sure how this would work. Can I use the Workflow Properties->Active-X Script's Main Function to alter the task to get it to re-run (and change the date-parameter from within the Workflow's VBScript)? Currently, the parameters are set in a task prior to the data-pump task. "Patrick" <patl (AT) reply (DOT) newsgroup.msn.com> wrote in message news:eshCD$DTFHA.3332 (AT) TK2MSFTNGP15 (DOT) phx.gbl... I have a DTS package that extracts data from a Sybase 11 datasource into a holding table in SQL Server 7 using a data-pump. The Sybase data-source is meant to return something in the region of 1million records. Because of a large date range from the query in Sybase, even putting it into a Stored Procedure isn't much help, and we have little choice but to re-run the Stored Procedure in Sybase multiple times for smaller date range. How could I do this dynamically? The Data source is something like EXEC p_dataExtractor 20010101,20050331 I want to reduce the date range and called it multiple times. I know I can do something like the following to change the DataSource's SQL ' Get a handle Set oCustomTask = oPackage.Tasks( "DTSTask_DTSDataPumpTask_1").CustomTask sSQL = oCustomTask.SourceSQLStatement 'Call SetDateParams to subsitute templated date parameters with actual date parameters SetDateParms sSQL, _ DTSGlobalVariables( "gvStart_dt").Value, _ DTSGlobalVariables( "gvEnd_dt").Value) oCustomTask.SourceSQLStatement = sSQL But what can I actually do to repeat the process &/or to re-wire the process (rather than having a long chain of static sequential pumps)?? |
#5
| |||
| |||
|
|
Here is a quite a simple example that demonstrates looping- How to loop through a global variable Rowset (http://www.sqldts.com/default.aspx?298) |
![]() |
| Thread Tools | |
| Display Modes | |
| |