This is so ridiculous... I am shy to ask!!!
I trying to call a SQL command using conditions. So I created a parameter mapping to map the variable that I will use as a condition:
I configured the properties as follow:
I tried the query without any parameter to test it and it was working fine:
Declare @LoadType
nvarchar(3)='CRI'
PRINT @LoadType
IF @LoadType ='CRI'
TRUNCATETABLE CriticalList.tblCriticalList
ELSEIF @LoadType='SRP'
TRUNCATE
TABLE CriticalList.tblStrategicResponseUnitList
Then I modified it to get the value of the variable mapped:
Declare @LoadType
nvarchar(3)= ?
PRINT @LoadType
IF @LoadType ='CRI'
TRUNCATETABLE CriticalList.tblCriticalList
ELSEIF @LoadType='SRP'
TRUNCATE
TABLE CriticalList.tblStrategicResponseUnitList
Error message:
Am I doing something wrong???
Mylene Chalut