i am trying to convert the stored procedure in SQL in MYSQL without using any tool.
In sql there is a stored procedure which use xml document handle.here is below code in sql using exec sp_xml_preparedocument.
create procedure insert(xmlstring varchar(max))
BEGIN
DECLARE @xmlHandle INT
DECLARE @DemoTable TABLE
(
[Name] VARCHAR(50),
[Address] VARCHAR(50),
[Phone] VARCHAR(50)
)
EXEC sp_xml_preparedocument @xmlHandle output, @xmlString
INSERT INTO @DemoTable
SELECT [Name] ,
[Address],
[Phone]
FROM OPENXML (@xmlHandle, '/NewDataSet/SampleDataTable',1)
WITH ([Name] varchar(50) '@Name',
[Address] varchar(50) '@Address',
[Phone] varchar(50) '@Phone'
)
INSERT INTO Details ([Name],
[Address],
[Phone])
(SELECT [Name] ,
[Address],
[Phone]
FROM @DemoTable)
EXEC sp_xml_removedocument @xmlHandle
I want to convert this sql stored procedure into mysql,but the problem is that mysql doesnt support sp_xml_preparedocument and sp_xml_removedocument