• 批量运维SQl生成,可以用EXCEl,也可以SQL查询生成


    select  'insert into Base_VehiclesInformation (ID,CarModelID,FistRegTime,ScrappageDate,
    Creator,CreateTime,LastModifier,LastModifyTime,CustType,Enable,flag,OpCompany,	
    Source,IfLVehicle,IsAutoInsert,PRI,IsAuth,IsInputBDEVR,RealTimeDataSource,IfShare,		
    VehicleMonitorSign,IsAutoCharge,IfDeliveryOperation	,RegAddr,
    CarType,CarNo,CarLicense,EngineNo) 
    select NEWID(),''e3cb0e32-443c-4f97-aad7-7a998964cc51'',''2019-02-20 00:00:00.000'',
    ''1900-01-01 00:00:00.000'',''gaojf'',''2019-02-20 16:06:14.740'',''gaojf'',''2019-02-20 16:06:14.740'',''1'',
    ''1'',''1'',''fb247fb4-13d1-4c1b-acf8-27278b9bd0b1'',''2'',''1'',''0'',
    ''5'',''0'',
    ''1'',''1'',''0'',''0'',''2'',''0'',''1101'',''3'','''+cme.EvcInfo_CarNo+''','''+REPLACE(cme.evcInfo_carLicense,'·','')+''','''+isnull(cme.EvcInfo_EngineNo,'')+'''' 
    	from CM_EvcInfo cme
    	where cme.EvcInfo_CarNo like 'LVCB4L4%'
    	and  cme.EvcInfo_CarNo NOT IN (
                SELECT  cme1.EvcInfo_CarNo
                FROM    CM_EvcInfo cme1
                WHERE   cme1.EvcInfo_RegAdd LIKE 'A891BF09-DC2E-47F9-B5D1-76D7CD579CBD' )
        AND NOT EXISTS(SELECT CarNo FROM [dbo].[CarInfo201902202$] WHERE CarNo=cme.EvcInfo_CarNo)
    

      

    EXCEl方式:找到需要修改的字段,变成列格式,再经行处理

  • 相关阅读:
    平衡树板子
    51nod1201 整数划分
    时态同步[ZJOI2007]
    玉米田Corn Fields
    中国象棋[AHOI2009]
    孤岛营救与汽车加油行驶问题
    运输问题
    航空路线问题(dp解法)
    最小路径覆盖
    后缀排序(后缀数组初探
  • 原文地址:https://www.cnblogs.com/gao109214/p/10614410.html
Copyright © 2020-2023  润新知