Declare @xml XML
set @xml = (select cast(c1 as xml) from OPENROWSET (BULK 'XMLpath.xml',SINGLE_BLOB) as T1(c1))
insert into TableName (Col1,Col2,Col3)
SELECT A.Column1,A.Column2,A.Column3 FROM
(SELECT
Tbl.Col.value('@XmlTag', 'varchar(200)') as Col1,
Tbl.Col.value('@XmlTag', 'datetime') as Col2,
Tbl.Col.value('@XmlTag', 'varchar(2000)') as Col3
FROM @xml.nodes('//XMLNode') Tbl(Col) ) A
set @xml = (select cast(c1 as xml) from OPENROWSET (BULK 'XMLpath.xml',SINGLE_BLOB) as T1(c1))
insert into TableName (Col1,Col2,Col3)
SELECT A.Column1,A.Column2,A.Column3 FROM
(SELECT
Tbl.Col.value('@XmlTag', 'varchar(200)') as Col1,
Tbl.Col.value('@XmlTag', 'datetime') as Col2,
Tbl.Col.value('@XmlTag', 'varchar(2000)') as Col3
FROM @xml.nodes('//XMLNode') Tbl(Col) ) A