• 插入协同事项分类


    declare @pguid varchar(50)
      declare auth_cur cursor for
      select RowGuid from BIMPM_Base.dbo.ProjectInfo as a where a.RowGuid <> 'dt20180328-3e44-4870-a2c3-2e7aa0932dce'
      open auth_cur
      fetch next from auth_cur into @pguid
      while(@@FETCH_STATUS=0)
        begin
    	     insert into [BIMPM_RoadBridge].[dbo].[MatterProcessProjectTemplateCategory]
    		 (RowGuid,ProjectRowGuid,CategoryName,CategoryNumber,SortOrder,Description,CreationDate,LastModificationDate)
    		 values
    		 (NEWID(),@pguid,'领导视察','ldsc',1,'1',getdate(),getdate())
    
    		 insert into [BIMPM_RoadBridge].[dbo].[MatterProcessProjectTemplateCategory]
    		 (RowGuid,ProjectRowGuid,CategoryName,CategoryNumber,SortOrder,Description,CreationDate,LastModificationDate)
    		 values
    		 (NEWID(),@pguid,'监理视察','jlsc',2,'1',getdate(),getdate())
    
    		 insert into [BIMPM_RoadBridge].[dbo].[MatterProcessProjectTemplateCategory]
    		 (RowGuid,ProjectRowGuid,CategoryName,CategoryNumber,SortOrder,Description,CreationDate,LastModificationDate)
    		 values
    		 (NEWID(),@pguid,'其他','qt',3,'1',getdate(),getdate())
    
       fetch next from auth_cur into @pguid
       end
    
       close auth_cur
    

      更新协同事项

      update a
      set a.TemplateCategoryName = b.CategoryName, a.TemplateCategoryRowGuid = b.RowGuid
      from [BIMPM_RoadBridge].[dbo].[Matter] as a left join [BIMPM_RoadBridge].[dbo].[MatterProcessProjectTemplateCategory] as b 
      on a.mProjectGuid = b.ProjectRowGuid and b.CategoryName ='其他' 
    

      

  • 相关阅读:
    洛咕 P4131 [WC2005]友好的生物
    P3354 [IOI2005]Riv 河流
    洛咕 P3645 [APIO2015]雅加达的摩天楼
    洛咕 P4528 [CTSC2008]图腾
    CSDN不登录阅读全文(最新更新
    #6472. 「ICPC World Finals 2017」难以置信的任务 Mission Improbable
    #6435. 「PKUSC2018」星际穿越
    #2009. 「SCOI2015」小凸玩密室
    #2007. 「SCOI2015」国旗计划
    PKUWC2018题解
  • 原文地址:https://www.cnblogs.com/wangzuofei/p/11422774.html
Copyright © 2020-2023  润新知