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 |
|
Rafferty Uy
Starting Member
23 Posts |
Posted - 2004-09-27 : 23:45:56
|
| Hello there,How do you retrieve values from your global variables inside an ExecuteSQLTask?something like:SELECT * from DTSGlobalVariables("database_name").dbo.Table1(this doesn't work)Thanks,Rafferty |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-09-28 : 07:20:43
|
| You can use a ? and click on parameters to substitute for the global variable.I usually use an activex task to create the sql and replace the source in the task completely as the above often does not work.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Rafferty Uy
Starting Member
23 Posts |
Posted - 2004-09-28 : 21:43:04
|
| '?' only works for stored proc parameters or at set/conditional statements. Unfortunately it doesn't work when you use it for a database name.anyhows, I found a solution and it's with the use of dynamic SQL. thanks for the help :)-Rafferty |
 |
|
|
|
|
|