The XML parse error 0xc00ce505 occurred on line number 4, near the XML text "
The error description is 'A name contained an invalid character.'.
Msg 208, Level 16, State 1, Line 23
Invalid object name 'CustomerDetails'.
Here's the statements that i have written.
create database Abhishek
use Abhishek
DECLARE @Doc int
DECLARE @XMLDoc nvarchar (100)
SET @XMLDoc = N'
exec sp_xml_preparedocument @Doc OUTPUT, @XMLDoc
INSERT INTO CustomerDetails
SELECT * FROM openxml(@Doc,'/ROOT/Customer',1) WITH (CustomerID varchar(10), ContactName varchar(20))
I'd really appreciate your help :)
EDIT : OMG i caught my fault ! I declared the DECLARE @XMLDoc nvarchar (100) toooooooo small !!! lmao
Replies
Know the answer? Post it — somebody with the same question will find it here.