Execute SQL Task - passing parameter problem - Microsoft SQL Server
This is a discussion on Execute SQL Task - passing parameter problem - Microsoft SQL Server ; I have an Execute SQL Task DECLARE @SERVER VARCHAR(8000) SET @SERVER = ? SELECT COUNT(*) FROM MASTER.DBO.SYSSERVERS WHERE SRVNAME = @SERVER In the Execute SQL Task parameter mapping, I create an INPUT param, set my value to a variable and ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| DECLARE @SERVER VARCHAR(8000) SET @SERVER = ? SELECT COUNT(*) FROM MASTER.DBO.SYSSERVERS WHERE SRVNAME = @SERVER In the Execute SQL Task parameter mapping, I create an INPUT param, set my value to a variable and set parameter name to 0. When Executing the query i get an error "Syntax error, permission violation, or other nonspecific error" where as if remove the declared variable and tried with direct query like below SELECT COUNT(*) FROM MASTER.DBO.SYSSERVERS WHERE SRVNAME = ? it works exactly fine. any idea why its not working with declared variable. ![]() ![]() |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 05:18 AM.






Linear Mode