Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ustreddogdog
Starting Member
3 Posts |
Posted - 2004-09-24 : 04:48:36
|
I have implemented a DTS that copy some data from a table to another. However, the DTS select different date and table to copy to. Therefore, I have implemented a program that will change an INI file accordingly and the DTS has been set global variables and use dynamic properties task to change the global variable from the INI file. Howver, it was found that the parameter can only be used in the where cause but not in the select/ delete cause. For example,1. SELECT * FROM myTable WHERE myDate BETWEEN ? AND ?2. SELECT * FROM ? WHERE myDate BETWEEN ? AND ?3. DELETE FROM myTable WHERE myDate BETWEEN ? AND ?4. DELETE FROM ? WHERE myDate BETWEEN ? AND ?for 1 and 3, i parse the query correctly. However, it fails for 2 and 4. It is a must that I need to change the table name accordingly. How can I do!!??  |
|
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2004-09-24 : 08:14:19
|
| You can use activex script for that !. Write a script behind the task to set the query dynamically before execution.. use global variable to build the query dynamically.. search in www.sqldts.com, you can find a lot of examples.- Sekar |
 |
|
|
|
|
|