Sql Sorgusu ile Xml Dosyası Okuma
Cumartesi, 06 Haz 2020
yorum yok
DECLARE @cars xml
SELECT @cars = C
FROM OPENROWSET (BULK 'C:\__Temp\userGbList.xml', SINGLE_BLOB) AS Cars(C)
SELECT @cars
DECLARE @hdoc int
EXEC sp_xml_preparedocument @hdoc OUTPUT, @cars
SELECT * into userGbList_05062020
FROM OPENXML (@hdoc, '/UserList/User' , 2)
WITH(
Identifier VARCHAR(50),
Alias VARCHAR(100),
Title VARCHAR(500),
Type VARCHAR(50),
FirstCreationTime DateTime,
AliasCreationTime DateTime,
AccountType Int
)
EXEC sp_xml_removedocument @hdoc
Categories: Genel