1. In BI, I created two variables, SourceTableRowCount and
TargetTableRowCount, both are Int32.
2. In SSIS package, I created a "Execute SQL Task" with settings as:
* Under General
Code Page: 1252
ResultSet: Single row
ConnectionType: OLE DB
Connection: (a connection to oracle server which shared by other tasks
without any problems)
SQLSourceType: Direct input
SQLStatement: SELECT COUNT(*) AS NOROWS FROM *TABLE_NAME*
* Under Result Set
Result Name: NOROWS
Variable Name: User::SourceTableRowCount
When I run this task, I got the error message:
[Execute SQL Task] Error: An error occurred while assigning a value to
variable "SourceTableRowCount":"Unsupported data type on result set binding
NOROWS.".
I tried changing SourceTableRowCount's data type to object, int64, string,
double and none of them worked. I have alos changed the statement to SELECT
TO_NUMBER(COUNT(*)) AS NOROWS FROM *TABLE_NAME*, or SELECT COUNT(*) FROM
*TABLE_NAME*
I got the same error message.
Somehow, I run the same set up on the SQL server side, the SQL task executed
successfully.
Extra Information:
My PC has Windows XP with SP2. Oracle Client 9.02.00.54 Installed. I created
service naming in net manager, then, in ODBC\System DSN, I created a data
source using Oracle ODBC Driver.
Thank you in advance and happy holidays.