![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I'm working on DTS package to copy all data related to a particular client from a production server (SQLServer 2000), to a development server (also SQL Server 2000). I've set up the package on the destination server. I'm trying to set up DTSDataPump tasks to copy subsets of the client information to the development server using a queries with a single parameter as the source. Where I run into trouble is when I have to have that parameter as part of a SUBQUERY...DTS apparently doesn't using parameters in subqueries...I haven't been able to figure out a way around this yet. Sample SQL: SELECT * FROM tblClaimActions WHERE ClaimID IN (SELECT ClaimID FROM tblClaims WHERE ClientID = ?) If I replace the "?" with a value (e.g. 153), it works fine for pulling the Actions related to all claims for client 153. There are several tables I have to do this sort of thing for, so I'd like to be able to set up a global variable, map the query parameter(s) to that variable in each task. This will allow me to change the target ClientID in one place (the global variable) and transfer the only the data I'm after. |
![]() |
| Thread Tools | |
| Display Modes | |
| |