![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, I have several DTS packages for transforming and loading data from one database to another. The packages transform data in a staging Db and then load it into the final Db. Each package contains several SQL Tasks, and within each of those tasks are several SQL Queries. The queries point to both databases (within the same SQL task), and therefore each SELECT/UPDATE/DELETE etc. statement refers to the full table name - databasename.dbo.tablename. The problem I have is that when I transfer the packages from one environment to another, i.e. from Development to Test, I have to go through every task and manually change the table references in each query. Is there any way I can place the database name in a global variable within the DTS package, and then write each query so that it refers to the variable as part of the table name (SELECT Field from @db_name.dbo.tablename, for example)? It would make life much easier if I only had to change the two variables containing the database names, as opposed to each query individually! Thanks for any suggestions/help. Cheers, Paul. |
![]() |
| Thread Tools | |
| Display Modes | |
| |