zoukankan      html  css  js  c++  java
  • sql2008 xml 读取 写入 存储过程

    alter procedure p_load_stryker_xml @xml nvarchar(max) as set nocount on declare @ixml int EXEC sp_xml_preparedocument @ixml OUTPUT, @xml INSERT INTO t_dealer_out_import (id,indexid,productid,productcode,sn,barcodep,barcodes,quantity,productname,ProductGroup,ProductLine,ProductCategory,reason,dealer,dealerid,changedealerid,stockdate,deptid,dept,ProvinceId,province,hospitalid,Hospital,ordercode,price,reportdate,dealerShortName,OrderNo) SELECT * FROM OPENXML (@ixml, '/root/row',2) WITH ( id int 'id', indexid nvarchar(50) 'indexid', productid nvarchar(50) 'productid', productcode nvarchar(50) 'productcode', sn nvarchar(50) 'sn', barcodep nvarchar(50) 'barcodep', barcodes nvarchar(50) 'barcodes', quantity int 'quantity', productname nvarchar(255) 'productname', ProductGroup nvarchar(100) 'ProductGroup', ProductLine nvarchar(100) 'ProductLine', ProductCategory nvarchar(100) 'ProductCategory', reason text 'reason', dealer nvarchar(100) 'dealer', dealerid nvarchar(50) 'dealerid', changedealerid nvarchar(50) 'changedealerid', stockdate nvarchar(50) 'changedealerid', deptid nvarchar(50) 'deptid', dept nvarchar(100) 'dept', ProvinceId nvarchar(10) 'ProvinceId', province nvarchar(50) 'province', hospitalid nvarchar(50) 'hospitalid', Hospital nvarchar(50) 'Hospital', ordercode nvarchar(50) 'ordercode', price decimal(18, 2) 'price', reportdate nvarchar(50) 'reportdate', dealerShortName nvarchar(50) 'dealerShortName', OrderNo nvarchar(50) 'OrderNo' ) SELECT id,indexid,productid,productcode,dealer,dept,province,Hospital,reportdate,dealerShortName,OrderNo From t_dealer_out_import where id in ( SELECT id FROM OPENXML (@ixml, '/root/row',2) WITH ( id int 'id' ) ) EXEC sp_xml_removedocument @ixml

  • 相关阅读:
    简单学习MyBatis
    探讨AOP的两种实现方式
    浅析Spring AOP术语
    依赖注入(DI)的迭代实现
    初识依赖注入(DI)
    Bean工厂ApplicationContext
    ps文章推荐
    ueditor全屏和el-dialog模态框有冲突的解决方法(其他框架请比葫芦画瓢)
    (各种转载)
    element-ui修改样式不生效的官网解决方式
  • 原文地址:https://www.cnblogs.com/y0umer/p/3839342.html
Copyright © 2011-2022 走看看