
USE [SodaDB]
go

INSERT INTO order_form_temp(order_form_xml)
SELECT * FROM OPENROWSET(
   BULK 'C:\Labs\L08_XML\Solution\XMLDataType\order4.xml',
   SINGLE_BLOB) AS x
go

-- END OF ATTEMPT TO INSERT FRAGMENT

-- "content" indicates fragments are allowed
ALTER TABLE order_form_temp 
  ALTER COLUMN order_form_xml XML(content orderType)
go

-- END OF ALTER TABLE

-- now the insert will work
INSERT INTO order_form_temp(order_form_xml)
SELECT * FROM OPENROWSET(
   BULK 'C:\Labs\L08_XML\Solution\XMLDataType\order4.xml',
   SINGLE_BLOB) AS x
go

SELECT * FROM order_form_temp
go