![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I do not know much about DTS global variables and I cannot use global variables references ("?") in some DTS exec sql tasks : For example : DECLARE @var INT SET @var = ? [...] (quite long script) does not work: I guess "SET ... = ?" is not allowed but what is the workaround ? When I click on "Parameters" or "Analyse", I get "Syntax error or Access violation"... but when I replace ? by a value, the task works well. I really do not know how to solve this problem... I would be great if someone could give me some information or some web links in order to learn more about global variables use. Thank you, |
#3
| |||
| |||
|
|
In message <mn.528f7d49af5b1865.17504 (AT) despamonline (DOT) fr>, Bluesky25 bluesky25_pas (AT) de_spam_online (DOT) fr> writes Hello, I do not know much about DTS global variables and I cannot use global variables references ("?") in some DTS exec sql tasks : For example : DECLARE @var INT SET @var = ? [...] (quite long script) does not work: I guess "SET ... = ?" is not allowed but what is the workaround ? When I click on "Parameters" or "Analyse", I get "Syntax error or Access violation"... but when I replace ? by a value, the task works well. I really do not know how to solve this problem... I would be great if someone could give me some information or some web links in order to learn more about global variables use. Thank you, There is a workaround described here, where you use a simple statement to set the parameters then swap it out for your real SQL behind the scenes- Global Variables and Stored Procedure Parameters (http://www.sqldts.com/default.aspx?234) |
![]() |
| Thread Tools | |
| Display Modes | |
| |