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

  • 相关阅读:
    nginx-dockerfile
    redis-dockerfile
    php-dockerfile
    redis配置优化
    linux 相关命令
    redis服务器主机建议修改配置
    redis主从连接不成功错误
    数据库设计 读多写少、写多读少、写多读多各场景数据库建设方案
    查看容器IP和端口
    JavaScript基础知识六(内存释放、作用域销毁)
  • 原文地址:https://www.cnblogs.com/y0umer/p/3839342.html
Copyright © 2011-2022 走看看