onesegun
asked on
SSIS. Execute SQL Task Parameter Mapping
Hi there,
I have this SQL query in the SQL Execute Task Editor:
In the parameter mapping I have the following user defined variable: 'User::CompanyCode' that has the following values ('8560',4956','5863','6245 ') and it is a string data type.
I have set the parameter mapping as follows for this variable:
1. Direction: Input
2. Data Type: VARCHAR
3. Parameter Name: 0
4. Parameter Size: -1
The SQL does not execute as expected i.e. returns 0 records.
However, if I put query in the SQL Execute task it works:
What I'm I doing wrong?
Thanks
OS
I have this SQL query in the SQL Execute Task Editor:
INSERT INTO [aging].[dbo].[ag_ageddebtor]
SELECT * FROM [aging].[dbo].[ag_ageddebtor_staging]
WHERE [Co Code] IN (?)
.In the parameter mapping I have the following user defined variable: 'User::CompanyCode' that has the following values ('8560',4956','5863','6245
I have set the parameter mapping as follows for this variable:
1. Direction: Input
2. Data Type: VARCHAR
3. Parameter Name: 0
4. Parameter Size: -1
The SQL does not execute as expected i.e. returns 0 records.
However, if I put query in the SQL Execute task it works:
INSERT INTO [aging].[dbo].[ag_ageddebtor]
SELECT * FROM [aging].[dbo].[ag_ageddebtor_staging]
WHERE [Co Code] IN ('8560',4956','5863','6245')
.What I'm I doing wrong?
Thanks
OS
ASKER
No the brackets are not included.....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Does User::CompanyCode have ('8560',4956','5863','6245