MySQL Forums
Forum List  »  Newbie

SSIS returning a count of rows from MySQL table
Posted by: Jill Blesch
Date: August 03, 2018 08:25AM

I'm sure this is a simple question but here goes. In An SSIS package I want to return the number of rows from a MySQL table where the id is equal to a variable. I'm using an SQL task with input parameters and a result set. And I get a generic error message "Error: 0xC002F210 at Validate Contacts, Execute SQL Task: Executing the query "set @counter := select count(*) from contacts w..." failed with the following error: "Fatal error encountered during command execution.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Validate Contacts" What am I doing wrong?

The SQL statements that I'm executing are:
set @counter := select count(*) from contacts where id = @var_contact_id;
select @counter;

And the resultset is set to Single Row
and the Result Set Result Name is @counter mapped to an SSIS defined variable.

Options: ReplyQuote


Subject
Written By
Posted
SSIS returning a count of rows from MySQL table
August 03, 2018 08:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.