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

      

  • 相关阅读:
    从0开始学习 GitHub 系列之「02.加入 GitHub」
    从0开始学习 GitHub 系列之「01.初识 GitHub
    用Redis轻松实现秒杀系统
    算法之美
    Android窗口管理服务WindowManagerService显示Activity组件的启动窗口(Starting Window)的过程分析
    6)django-示例(fbv)
    5)django-模板
    4)django-视图view
    3)django-路由系统url
    2)django-请求生命周期
  • 原文地址:https://www.cnblogs.com/wangzuofei/p/6013447.html
Copyright © 2011-2022 走看看