![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm just starting out with dts. 1. I would like to know how to assign the result of an sql statement to a variable in an activex vbs script. (Assume the select statement returns only one value). 2. What is the maximum value that can be returned when checking the string length using LEN function? Thanks. Madhusudhan |
#3
| |||
| |||
|
|
1. Use the ExecuteSQL task Your statement would look like this SELECT value FROM TABLE Hit the parameters button Go to output parameters tab | Row value Drop down the Global variables combobox and either choose or go to the bottom of the box and create a new one. Have a look towards the end of this article How to Use Lookups in DTS (http://www.sqldts.com/default.aspx?277) -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Madhusudhan" <Madhusudhan (AT) discussions (DOT) microsoft.com> wrote in message news:18E27B86-862D-4FED-84F1-35424F390BC9 (AT) microsoft (DOT) com... Hi, I'm just starting out with dts. 1. I would like to know how to assign the result of an sql statement to a variable in an activex vbs script. (Assume the select statement returns only one value). 2. What is the maximum value that can be returned when checking the string length using LEN function? Thanks. Madhusudhan |
#4
| |||
| |||
|
|
Thanks Allan for replying. I did look at the tutorial you suggested on your website. twas helpful. but that seems to suggest that i need to create an execute sql task. um..is it not possible to embed sql's in the vbs activex script and use the results of the query in my script? I have an Activex script task and am hoping to keep most of the functionality localised in it. Thanks Madhusudhan "Allan Mitchell" wrote: 1. Use the ExecuteSQL task Your statement would look like this SELECT value FROM TABLE Hit the parameters button Go to output parameters tab | Row value Drop down the Global variables combobox and either choose or go to the bottom of the box and create a new one. Have a look towards the end of this article How to Use Lookups in DTS (http://www.sqldts.com/default.aspx?277) -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Madhusudhan" <Madhusudhan (AT) discussions (DOT) microsoft.com> wrote in message news:18E27B86-862D-4FED-84F1-35424F390BC9 (AT) microsoft (DOT) com... Hi, I'm just starting out with dts. 1. I would like to know how to assign the result of an sql statement to a variable in an activex vbs script. (Assume the select statement returns only one value). 2. What is the maximum value that can be returned when checking the string length using LEN function? Thanks. Madhusudhan |
![]() |
| Thread Tools | |
| Display Modes | |
| |