|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 5:30 AM
Points: 870,
Visits: 522
|
|
hi All,
I want to use the variable in Execute sql task.
My script will return based on the Variable.
DECLARE @Env VARCHAR(5) DECLARE @FilePath VARCHAR(500),@ToMail VARCHAR(500) SET @Env=SSISVAriable SELECT @FilePath=CASE @Env WHEN 'Dev' THEN '\\Dev\' WHEN 'Test' THEN '\\Test\' WHEN 'UAT' THEN '\\UAT\' WHEN 'PrdSRV' THEN '\\PrdSRV\' ELSE '\\share\' END, @ToMail=CASE @Env WHEN 'Dev' THEN 'abcd@xyz.com' WHEN 'Test' THEN 'abcd@xyz.com' WHEN 'UAT' THEN 'abcd@xyz.com' WHEN 'PrdSrv' THEN 'a2z@xyz.com;1to9@abc.com' ELSE 'saasd@gmail.com' END
Exec proc_test @FilePath,@tomail
Please give steps or any link which will helpful.
Thanks, Sasidhar Pulivarthi
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: 2 days ago @ 5:12 AM
Points: 4,226,
Visits: 9,458
|
|
To use SSIS variables within the Execute SQL task, use an Expression to set the appropriate property of the task.
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 5:30 AM
Points: 870,
Visits: 522
|
|
http://blogs.techrepublic.com.com/datacenter/?p=237
This link solved my problem
|
|
|
|