Package variable data type | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Package variable data type

I used the Execute SQl task editor with the statement as shown below and assigned the result to the variable NA_ID_DECIMAL which well declared. I encountered error which the error msg shown as below.I had tried the variable with different data type like Double,Int32,Int64,UInt32 and UInt64, but same error encounter.For this situation what data type for the variable that i still able to use? Thanks Note : tbSYS_Param_UnknownCode.NA_ID_DECIMAL data type in the table is decimal(28,2) SELECT tbSYS_Param_UnknownCode.NA_ID_DECIMAL
FROM tbSYS_Param_UnknownCode Error: The type of the value being assigned to variable "User::NA_ID_DECIMAL" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object.
What is the service pack level on SQL ? See whether you can change ResultSet option of ExecuteSQLTask from FullResultSet to SingleRow and change the data type of the variable from String to Object. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.