DECLARE @hdoc int DECLARE @doc xml select @doc=BulkColumn from (SELECT * FROM OPENROWSET(BULK 'E:\MyWeb\WebDev\WebDev\XMLFile1.xml',SINGLE_BLOB) a)b EXEC sp_xml_preparedocument @hdoc OUTPUT,@doc SELECT * into #temp FROM OPENXML (@hdoc, N'/SiteInfo/tb_QiXiang') with (Date datetime, NameID varchar(50), WSpeed int, WDirec nchar(10), Temp int, Weather nchar(10), Rainfall int) exec sp_xml_removedocument @hdoc DROP TABLE #temp
执行后显示(0行受影响) 语言分析也没有错误 不知道哪错了