sql openxml sp_xml_preparedocument xml 中文乱码
2013-10-30 20:48
411 查看
DECLARE @xmlText xml ,@idoc int
set @xmlText = (select doc from openrowset(bulk 'C:\Word\SRC\WebApp\Demo\XML\XMLFile.xml',single_blob) as t(doc))
--select @xmlText
EXEC sp_xml_preparedocument @idoc OUTPUT,@xmlText
--insert into TB_TB_Category
-- (Cid, Name, ParentCid)
--select [cid],[name],[parent_cid]
select *
from openxml(@Idoc,'/itemcats_get_response/item_cats/item_cat',2)
With(
[cid] bigint,
[Cis_parent] nvarchar(100),
[name] nvarchar(50),
[parent_cid] bigint
)
--where cid='50000671'
EXEC sp_xml_removedocument @idoc
set @xmlText = (select doc from openrowset(bulk 'C:\Word\SRC\WebApp\Demo\XML\XMLFile.xml',single_blob) as t(doc))
--select @xmlText
EXEC sp_xml_preparedocument @idoc OUTPUT,@xmlText
--insert into TB_TB_Category
-- (Cid, Name, ParentCid)
--select [cid],[name],[parent_cid]
select *
from openxml(@Idoc,'/itemcats_get_response/item_cats/item_cat',2)
With(
[cid] bigint,
[Cis_parent] nvarchar(100),
[name] nvarchar(50),
[parent_cid] bigint
)
--where cid='50000671'
EXEC sp_xml_removedocument @idoc
相关文章推荐
- SQL 中 sp_xml_preparedocument,openxml的使用
- sp_xml_preparedocument (Transact-SQL)--SQL Server 2008 联机丛书(2008 年 8 月)
- sql XML处理,sp_xml_preparedocument,openxml
- 使用sp_xml_preparedocument处理XML文档 保存到sqlserver中
- sp_xml_preparedocument 处理xml文档
- sp_xml_preparedocument sp_xml_removedocument 使用 实例 解析
- 使用sp_xml_preparedocument处理XML文档
- 存储过程使用sp_xml_preparedocument处理XML文档的方法
- Ibatis SQL配置文件.xml中文乱码处理
- sp_xml_preparedocument _使用 处理XML文档
- 使用sp_xml_preparedocument处理XML文档
- 当在一个xml doc里面使用一个很大xml doc作为attribute时sp_xml_preparedocument返回Unspecified error
- 使用sp_xml_preparedocument处理XML文档
- sp_xml_preparedocument OPENXML sp_xml_removedocument截取XML片段或指定格式的数据
- 使用sp_xml_preparedocument处理XML文档的方法
- sp_xml_preparedocument
- 使用sp_xml_preparedocument处理XML文档的方法
- 传递 xml string到sql server时的sp_xml_preparedocument无法解析问题
- mysql反向生成hbm.xml后,由hibernate向sql写数据中文出现乱码问题
- 传递: xml string到sql server时的sp_xml_preparedocument无法解析问题