SSIS Execute SQL Task Error on Variable

Kristie A 0 Reputation points
2025-04-29T23:21:53.8833333+00:00

I'm selecting a Number(38,0) data type field from an Oracle table and am attempting to pass the value returned from that Oracle select statement into an Int64 type variable in Visual Studio.

The query I'm using is

select max(<field_name>) from <table_name>

In the result set of the component, the Result Name is 0 and the Variable Name is my Int64 variable I have set up.

When I attempt to execute the component, I get the following error:

[Execute SQL Task] Error: An error occurred while assigning a value to variable "<variable name>": "Input string was not in a correct format.".

I have an identical process, same data types for the source table and variable to runs fine, but this new "cloned" one is throwing this error. Looking for suggestions.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,680 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.