I am trying to retrieve the value of Key
from a table with a simple select statement in SSIS through Execute SQL Task
. But have no luck figuring out this error.
I have used one input variable with string data type and used this variable in parameter mapping in Execute SQL Task
.
Executing the query "SELECT cast([Key] as Int) FROM Table where column = ?" failed with the following error: "An error occurred while extracting the result into a variable of type (DBTYPE_I4)". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Note : Datatype for Key
column is tinyint
This message occurs when the default datatype for the parameters remains as 'LONG' instead of whatever is necessary... In your case, this should be 'BYTE'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With