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 |
BobFoutFX4
Starting Member
9 Posts |
Posted - 2008-03-19 : 17:41:39
|
Can you use Global Variables in Execute SQL Tasks? I want to set the variable in an ActiveX Script and then use that variable in a sql statement for a WHERE clause. Is this possible?For example, I want to pull a specific date so I could prompt for the date in an ActiveX script, and then use that date inside a SQL statement to pull that dates results. |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-03-20 : 06:05:41
|
Yes, you can definitely use global variable in Execute SQL task. You can put ? in place of parameters and define input parameters which will be substitued later.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
BobFoutFX4
Starting Member
9 Posts |
Posted - 2008-03-20 : 08:45:43
|
Ok... so how do I reference it in the Execute SQL task? |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-03-20 : 08:49:39
|
Goto Execute SQL Task's properties, click on Parameters... button. In the "Parameter Mapping" dialog box, define desired input global variable as input parameter.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
|
|
|