Link to home
Start Free TrialLog in
Avatar of Ima Selco
Ima Selco

asked on

SQL Server 2005 SSIS SQL Execut SQL task to put single value in variable

I am trying to get a single column/row value into a variable. No matter what I try I do not get any values into my variable. Help.

SQL to get one column value:
select top 1 cast(ADMIN_EMAIL as varchar(100)) from ADMIN_EMAIL
(ADMIN_EMAIL = nvarchar(100), not null)
Result set user::MailTo (String)
Result Name = 0, Variable Name: user::MailTo
Connection Type: OLE DB
SQLSource: Direct Input
ResultSet: Single Row

 
ASKER CERTIFIED SOLUTION
Avatar of nmcdermaid
nmcdermaid

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ima Selco
Ima Selco

ASKER

I consider it a bug in MS Dev Studio when you execute a task, in debug mode, that updates a variable and the variable is unchanged after the task has executed.
Call it a feature :)
It doesn't really work that way though.... when you are in in design/debug mode, the variable is changed after the task is executed. Its only when you drop out of design mode that it changes.
Thats the nature of a variable.... its only there during run time. Thats the way most other development paltforms work. (except DTS of course!)