Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS error : [Execute SQL Task] Error: Executing the query

I am creating a SSIS package and trying to extract data by calling stored procedures from one database and inserting the result set values into another table of different database. I have created a Execute SQL task to extract the data, a for each loop container to loop through the result set and Execute SQL task within the for loop container to insert the result set data into another database table. I am getting an the following error while inserting the records. I guess its the issue with the mapping.

[Execute SQL Task] Error: Executing the query "insert into EmployeeCount (companyId..." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Following the screenshot of the template design

enter image description here

Following is the edit window of execute sql task which in inside the foreach container

enter image description here

The insert statement

insert into EmployeeCount (companyId,dataItemName,dataItemvalue,fiscalYear,fiscalQuarter,PeriodTypeId) values(companyId,dataItemName,dataItemvalue,fiscalYear,fiscalQuarter,PeriodTypeId)
like image 764
Tom Avatar asked Sep 12 '26 09:09

Tom


1 Answers

You will have to set "Parameter Name" in chronological order.

 i.e companyID parameter must be 0, dataItemvalue to 1 ....PeriodTypeId to 5 

Sample : enter image description here

like image 82
Sam Avatar answered Sep 15 '26 01:09

Sam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!