-2

I would like to write a stored procedure as below in SQL Server.

CREATE PROC [dbo].[Employee_delete]
AS

BEGIN
        SELECT * 
            FROM @employee
            FOR XML PATH(''), root ('EmployeeDelete'),xmlschema
END

But I'm getting the error--> 'inline schema is not supported with for xml path xmlschema'. May I know, how can I achieve XMLSchema with code "FOR XML PATH(''), root ('EmployeeDelete'),xmlschema"

To auto generate schemas in biztalk , I have to use word "xmlSchema"

Thanks in advance

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
Software Enginner
  • 675
  • 2
  • 14
  • 43

2 Answers2

0

If you are using BizTalk-2010 you should be using the WCF-SQL adapter for which you don't need to select as FOR XML to be able to generate schemas.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
-1

Try...

FOR XML AUTO,ROOT('EmployeeDelete'), TYPE, ELEMENTS XSINIL, XMLSCHEMA
Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102