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

      

  • 相关阅读:
    蓝桥网试题 java 基础练习 特殊的数字
    蓝桥网试题 java 基础练习 杨辉三角形
    蓝桥网试题 java 基础练习 查找整数
    蓝桥网试题 java 基础练习 数列特征
    蓝桥网试题 java 基础练习 字母图形
    蓝桥网试题 java 基础练习 01字串
    蓝桥网试题 java 基础练习 回文数
    蓝桥网试题 java 基础练习 特殊回文数
    Using text search in Web page with Sikuli
    each of which 用法
  • 原文地址:https://www.cnblogs.com/wangzuofei/p/6013447.html
Copyright © 2011-2022 走看看