Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SSIS Data Flow of a SQL Server Stored Procedure producing XML to a file

$
0
0

So we are trying to follow this procedure...

https://www.codeproject.com/Articles/635956/How-to-export-data-from-database-tables-to-an-XML

In our Data Flow Task and OLE DB Source we have...

EXECUTE[SchemaName].[SQLServerStoredProcedureName] ?,?

WITH RESULT SETS
(
(
[COl_XML] VARCHAR(MAX)
)
)

Our SQL Server Stored Procedure utilizes a Start Date and an End Date Parameter that have been defined and provided and is set FOR XML PATH('Entity'), ROOT('Entity'), TYPE) AS COl_XML;

We are using WITH RESULT SETS because there are numerous #Temporary Tables in our SQL Server Stored Procedure

When we attempt to Execute, we are getting the following Error message...

"EXECUTE statement failed because its WITH RESULT SETS clause specified type 'varchar(max)' for column #1 in result set #1, and the corresponding type sent at run time was 'xml'; there is no conversion between the two types.".

Are we missing something here? We also tried WITH RESULT SETS [Col_XML] XML and that failed as well.

We're pretty sure we have to use a Data Flow Task for this effort and cannot just do this from a Control Flow perspective.

Thanks for your review and am hopeful for a reply.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>