SELECT UCase(LTRIM(RTRIM(c.F2))) AS Name,c.F2 AS NameProperCase,c.F3 As Initials, c.F4 As CountryCode
FROM `Country$` c
I have the above query in an SSIS Excel Source as its SQL command. In the Excel Source Editor, i can successfully click preview and see the sample data returned by the query from the Excel file.
I have configured my Excel Connection Manager that the First row DOES NOT have column headers.
When i try to execute my package, it fails at this Excel source and the errors below are logged to my text Log file.
The SQL command requires 3 parameters, but the parameter mapping only has 0 parameters.
The SQL command requires 3 parameters, but the parameter mapping only has 0 parameters.
The SQL command requires 3 parameters, but the parameter mapping only has 0 parameters.
"Excel Source 2" (2303) failed the pre-execute phase and returned error code 0xC0207013.
"Excel Source 2" (2303) failed the pre-execute phase and returned error code 0xC0207013.
"Excel Source 2" (2303) failed the pre-execute phase and returned error code 0xC0207013.
If i reconfigure the Excel Connection Manager that the First row HAS column names, and then replace the Excel source query with the one below, the package runs fine with out errors
SELECT UCase(LTRIM(RTRIM(c.Name))) AS Name,c.Name AS NameProperCase,c.Initials, c.CountryCode
FROM `Country$` c
I don't have any parameters in the query but i am getting "The SQL command requires 3 parameters, but the parameter mapping only has 0 parameters." in the log file.
The only difference between the failing and succeeding Excel sources is the setting that First row has column names (Success with out error), AND First row does NOT have column names (Fails with errors posted above)
I haved faced the same issue, First i ran package by changing excel connection manager properties-> FirstRowHasColumn to False. I could preview the data, but only at run time, this error came.
After few googling no answer. Then found out myself.
Reason was i did not change excel connection string in config file or in properites. After changing connection string HDR to NO, it worked fine. HDR=NO
Right click excel connection manager-> properties-> connection string locate the value HDR. if HDR=YES then change it to NO. Ensure the same thing is done in config file as well if you have one. Cheers!