Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Xsd Schema from Stored-Procedure

Author  Topic 

gpc44
Starting Member

35 Posts

Posted - 2014-02-13 : 02:58:21
Hi,
if i want to create a xsd-Schema from a Table, i can use this statement:
SELECT * FROM Customer FOR XML AUTO, ELEMENTS, XMLSCHEMA('CustomerXsdSchema')

the Question:
this SP returns a select-statement. can I combine the xml statement wiht "fox xml, ...." somehow?
like this ....
EXEC [dbo].[OutputNAV2SOA]
FOR XML AUTO, ELEMENTS, XMLSCHEMA('sCustomerXsdSchema')

Regards
Nicole

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-02-13 : 08:13:37
yes. but only after dumping sp results to temporary table using INSERT..EXEC and then running a query on temporary table with FOR XML

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -