SQL Statement - IsQueryStoredProcedure = True SQL Statement - SQLStatement = spExportResultsToXML SQL Statement - SQLSourceType = Direct Input General - Description = Exectute SQL Task The stored procedure is executing correctly in SSMS, so I know this is correct.Ĭould there be a property configured incorrectly? SELECT have a feeling that this is failing because of the GETDATE function in the WHERE clause and the way the SSIS is handling it, but I cannot be certain. WHERE convert(varchar, dateadd(second, prod_data.tmProdDate, ''), 101) = convert(varchar, getdate(), 101)įOR XML RAW('ProdSched'),Root('Export'),ELEMENTS) LblMachineNumber = prod_data.nMachineNumber, LblProductNumber = prod_data.nProductNumber, LblProductionDate = convert(varchar, dateadd(second, prod_data.tmProdDate, ''), 101), LblInsertDate = convert(varchar, dateadd(second, prod_data.tmInsertDate, ''), 101), Here is a sample of the stored procedure (note that the dates are stored as seconds from in the database.this is the reason for the convert function): Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. I am running into a problem when attempting to execute this SQL Task and receiving the following error:Įrror: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "exec spExportResultsToXML" failed with the following error: "Exception has been thrown by the target of an invocation.". This task is connected to an ADO.NET connection and is the parent of a Script Task that writes the results of the SQL Task to an XML file. I have a stored procedure without parameters assigned to an Execute SQL Task.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |