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)
 Accessing DTS Global variable in Execute Sql task

Author  Topic 

SKP
Starting Member

34 Posts

Posted - 2006-12-13 : 07:15:23
Hi!,
I have declared a global variable in the pacakage properties of a DTS package. I need to access the value of this variable in DTS task called Execute Sql task, how can do this?

I tried something like this:
Declare @Recepient varchar(250)
Set @Recepient = DTSGlobalVariables("winIdentity").Value

This doesn't seem to work.

Can anyone help please?

nr
SQLTeam MVY

12543 Posts

Posted - 2006-12-13 : 07:47:37
Can't do it like that.
You can declare a parameter for the task (I think - often causes problems) but I usually use an activex task to create the sql using the parameter and update the sql task.

==========================================
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.
Go to Top of Page
   

- Advertisement -