zoukankan      html  css  js  c++  java
  • 游标使用之二

    ----循环查找构件表,在构件关系表中,给每个构件关联4张图纸
    declare @itemRowGuid varchar(50) declare auth_cur cursor for select RowGuid from [BIMPM_RoadBridge].[dbo].[ProjectConstructionItemInfo] where BidSectionRowGuid = '8373de62-4f87-4ca4-b741-30da6491785f-1' open auth_cur fetch next from auth_cur into @itemRowGuid while(@@FETCH_STATUS=0) begin INSERT INTO [dbo].[ProjectConstructionItemInfo_Relation] ([RowGuid],[ProjectConstructionItemInfoRowGuid],[RelationRowGuid],[RelationType],[ProjectRowGuid],[BidSectionRowGuid]) VALUES (NEWID(),@itemRowGuid,'3bb81ad1-c2c0-49b2-989f-57fdc7d833b8',1,'60ff4b50-2227-4ad2-8950-f7cdab801d6a','8373de62-4f87-4ca4-b741-30da6491785f-1') INSERT INTO [dbo].[ProjectConstructionItemInfo_Relation] ([RowGuid],[ProjectConstructionItemInfoRowGuid],[RelationRowGuid],[RelationType],[ProjectRowGuid],[BidSectionRowGuid]) VALUES (NEWID(),@itemRowGuid,'462e458b-24cc-4195-9df1-8e5bb69b7aa5',1,'60ff4b50-2227-4ad2-8950-f7cdab801d6a','8373de62-4f87-4ca4-b741-30da6491785f-1') INSERT INTO [dbo].[ProjectConstructionItemInfo_Relation] ([RowGuid],[ProjectConstructionItemInfoRowGuid],[RelationRowGuid],[RelationType],[ProjectRowGuid],[BidSectionRowGuid]) VALUES (NEWID(),@itemRowGuid,'21978931-d354-4185-993a-194e4b41479e',1,'60ff4b50-2227-4ad2-8950-f7cdab801d6a','8373de62-4f87-4ca4-b741-30da6491785f-1') INSERT INTO [dbo].[ProjectConstructionItemInfo_Relation] ([RowGuid],[ProjectConstructionItemInfoRowGuid],[RelationRowGuid],[RelationType],[ProjectRowGuid],[BidSectionRowGuid]) VALUES (NEWID(),@itemRowGuid,'fd1caf80-7877-493a-9cd3-ff2ca861d1de',1,'60ff4b50-2227-4ad2-8950-f7cdab801d6a','8373de62-4f87-4ca4-b741-30da6491785f-1') fetch next from auth_cur into @itemRowGuid end close auth_cur

      

  • 相关阅读:
    POJ 2400 Supervisor, Supervisee(KM)
    HDU 1695 GCD (容斥原理+欧拉函数)
    URAL 1244. Gentlemen (DP)
    HDU 1573 X问题 (中国剩余定理)
    ZOJ 3757 Alice and Bob and Cue Sports(模拟)
    HDU 1452 Happy 2004(因子和的积性函数)
    第五届山东省省赛总结
    mybatis错误——java.io.IOException: Could not find resource com/xxx/xxxMapper.xml
    springMVC+spring+mybatis搭建最近
    Log4j配置详解
  • 原文地址:https://www.cnblogs.com/wangzuofei/p/6013447.html
Copyright © 2011-2022 走看看