SQL读取RTX用户数据
作者:admin 日期:2013-07-12
一点积累,与大家分享
DECLARE @idoc int;
DECLARE @doc xml;
Select @doc=bulkcolumn FROM OPENROWSET(
BULK 'E:/RTX_20130712.xml',
SINGLE_BLOB) AS x
EXEC sp_xml_preparedocument @Idoc OUTPUT, @doc
Select * INTO #temp FROM OPENXML (@Idoc, '/RTX2005OrLater_Exported_Data_9D373D5B-AA39-42e7-A819-BF5F7A8961FC/Database/Sys_User/Item',4)
WITH (
[ID] int
,[UserName]varchar(50) --登录账号
,[Pwd] varchar(50)
,[PwdType] varchar(50)
,[SmsID] int
,[Name] varchar(50)
,[UserType] varchar(50)
,[Gender] varchar(50)
,[Face] varchar(50)
,[Mobile] varchar(50)
,[Email] varchar(50)
,[Phone] varchar(50)
,[ProfileOpenLevel] varchar(50)
,[BuddyAuth] varchar(50)
,[LastLogonTime] varchar(50)
,[UserRight] varchar(50)
,[AccountState] varchar(50)
,[UserVersion] varchar(50)
,[AuthType] varchar(50)
)
select * from #temp
drop table #temp
评论: 0 | 引用: 0 | 查看次数: 3861
发表评论