I have tried to upload the xml file into a column with xml type of the database table
I use sql statement like:
INSERT INTO xml_tbl(Filename,DATA)
SELECT 'file1' a,*
FROM OPENROWSET( BULK 'C:\XML\file1.xml' ,SINGLE_CLOB)
or into the existing column:
set data = (select * from openrowset (BULK 'C:\XML\file1.xml' ,SINGLE_CLOB) as x)
where Filename ='test'
but both of them raised an error "Msg 9438, Level 16, State 1, Line 1
XML parsing: line 2, character 6, text/xmldecl not at the beginning of input"
I don't know why?