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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Urgent Dts Problem

Author  Topic 

luissimoes
Starting Member

10 Posts

Posted - 2004-08-24 : 07:51:04
Hi there.

I urgently need to learn a way to use a global variable inside a query for a dynamic properties task...

I have a param table with all the settings for multiple servers... db's... users etc...

and i want to dinamically set all connections based on a variable passed to the dts!

the query should be something like this if possible:

all datasources where to be set to "select datasource from param_table where company=DTSGlobalVariable("company")"

all users where to be set to "select userid from param_table where company=DTSGlobalVariable("company")"

got it?

But the problem is i that i can't use global variables inside a query statement for the dynamic properties task.

So how can i manage to do this?

Best Regards
Luis Simões

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-24 : 12:07:10
well... ##temp is a global temp table. maybe you can store data in that?

select * into ##temp from MyTable

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-08-24 : 15:27:40
I tend to avoid dts as long as I can.. but..
Could you instead of passing company as parameter to the dts,
pass datasource, user, etc, etc as parameters to the dts.
It might be easier to resolve these values before executing the dts, than from within the dts.

www.sqldts.com -- resorce link for dts

/rockmoose
Go to Top of Page
   

- Advertisement -