dbTalk Databases Forums  

bcp to xml

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss bcp to xml in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Matthew Butler
 
Posts: n/a

Default bcp to xml - 11-18-2007 , 10:11 AM






can someone please advise me on the correct syntax to bcp export executing a
stored procedures results to xml

I know it begins

bcp "exe sp_procedure" queryout

but unser on the rest of the syntax

many thanks



Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: bcp to xml - 11-18-2007 , 05:03 PM






Matthew Butler (matthew.butler (AT) srjdebt (DOT) co.uk) writes:
Quote:
can someone please advise me on the correct syntax to bcp export
executing a stored procedures results to xml

I know it begins

bcp "exe sp_procedure" queryout

but unser on the rest of the syntax
I'm not really sure what you have in mind. To start with the procedure
must return XML data, either with FOR XML or the xml data type. And I
don't really think that FOR XML works that well with BCP, at least not
for larger documents.

What does your procedure look like? Which version of SQL Server are you
using?

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.