August 28, 2001 at 7:48 am
I need to be able to insert the value of a DTS globalvariable into a table. Is there a way of converting from/to a DTS globalvariable to/from a TSQL @localvariable.
DTSglobalvariable("GVname").value = @name
September 5, 2001 at 8:03 pm
Hey Colby,
Sorry we havent gotten to your question yet, give us a day or so to catch up.
Andy
September 6, 2001 at 5:24 am
Sure. In your Execute SQL task, use syntax like this:
SET @LOCALVARIABLE = ?
Then in SS 2K, click Parameters to specify which global variable the ? represents. In SQL 7, this is a little trickier so I'll hold that explaination until you say you don't have 2K.
Since the local variable is out of scope as soon as that step fires, make sure your entire query is in that task.
Brian Knight
http://www.sqlservercentral.com/columnists/bknight
Brian Knight
Free SQL Server Training Webinars
September 6, 2001 at 3:30 pm
I need to be able to do this both ways in SQL 7 which I have now and SQL 2000 which will be installed in the next month.
Thanks
Colby
September 6, 2001 at 4:52 pm
quote:
I need to be able to do this both ways in SQL 7 which I have now and SQL 2000 which will be installed in the next month.
You'll have to write a more complex ActiveX task that uses the DTS Object model. This gets a little dicy. If you don't have experience with this, you may want to wait the month until 2K because it may take you a few days-weeks to learn how to do it the old fashion way.
Brian Knight
http://www.sqlservercentral.com/columnists/bknight
Brian Knight
Free SQL Server Training Webinars
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply