• 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

  • 相关阅读:
    智能制造及其十大关键技术
    浅谈华为验厂对MES系统的要求
    aps系统切换切记“三要三不要”
    周黑鸭借力MES,推进智能生产
    MES助力伊利集团打造智慧工厂
    智能制造下一个风口:工业智能
    大规模定制模式之于MES的三点思考
    APS中生产计划排程模块的基本原理
    通读审计之wiinews
    wiinews sql注入漏洞分析
  • 原文地址:https://www.cnblogs.com/y0umer/p/3839342.html
Copyright © 2020-2023  润新知