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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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!)
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!)
ASKER