dbo.QER_PITShop_PRNodesMove
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
Relations
- No extracted relations.
Typed Edges
- references source dbo.QBM_FGIGuidIsValid source text reference
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_FGISessionErrorRethrow source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QER_PITShopProductNodeCreate source text reference
- references source dbo.QER_PITShopProductNodeCreate_b source text reference
- references source dbo.QER_PITShopProductNodeMove source text reference
Complete Source
1CREATE PROCEDURE QER_PITShop_PRNodesMove(2 @PRNodes QBM_YSingleGUID READONLY,3 @UID_OrgBOTarget varchar(38)4)5AS6BEGIN7 DECLARE @UID_OrgPRSource varchar(38)8 DECLARE @ElementBuffer QBM_YCursorBuffer9 DECLARE @ElementCount int10 DECLARE @ElementIndex int11 DECLARE @ObjectKeyElements QBM_YParameterList12 DECLARE @GenProcID varchar(38)13 SET XACT_ABORT OFF14 BEGIN TRY15 SELECT @GenProcID = dbo.QBM_FGISessionContext('')16 INSERT INTO @ElementBuffer(UID1,17 ObjectKey1)18 SELECT19 n.UID_SingleGuid,20 bho.ObjectKey21 FROM @PRNodes n22 JOIN ITShopOrg pr23 ON n.UID_SingleGuid = pr.UID_ITShopOrg AND pr.ITShopInfo = 'PR'24 JOIN BaseTreeHasObject bho25 ON n.UID_SingleGuid = bho.UID_Org26 WHERE27 dbo.QBM_FGIGuidIsValid(pr.UID_ITShopOrg) & 2 = 0 AND bho.InheritInfo = 128 SELECT @ElementCount = @@ROWCOUNT29 SELECT @ElementIndex = 130 INSERT INTO @ObjectKeyElements(Parameter1)31 SELECT bu.ObjectKey132 FROM @ElementBuffer bu33 EXEC QER_PITShopProductNodeCreate_b @UID_OrgBOTarget,34 @ObjectKeyElements,35 @GenProcID36 WHILE @ElementIndex <= @ElementCount37 BEGIN38 SELECT TOP 1 @UID_OrgPRSource = bu.UID139 FROM @ElementBuffer bu40 WHERE41 bu.ElementIndex = @ElementIndex42 EXEC QER_PITShopProductNodeMove @UID_OrgPRSource,43 @UID_OrgBOTarget44 SELECT @ElementIndex += 145 END46 END TRY47 BEGIN CATCH48 EXEC QBM_PSessionErrorAdd DEFAULT49 DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()50 RAISERROR(@Rethrow,51 18,52 1)53 WITH NOWAIT54 END CATCH55 ende:56 RETURN57END
Open raw exported source
1 create procedure QER_PITShop_PRNodesMove (@PRNodes QBM_YSingleGUID readonly , @UID_OrgBOTarget varchar(38) ) as begin declare @UID_OrgPRSource2 varchar(38) declare @ElementBuffer QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int declare @ObjectKeyElements QBM_YParameterList3 declare @GenProcID varchar(38) SET XACT_ABORT OFF BEGIN TRY select @GenProcID = dbo.QBM_FGISessionContext('') insert into @ElementBuffer (UID1, ObjectKey14) select n.UID_SingleGuid, bho.ObjectKey from @PRNodes n join ITShopOrg pr on n.UID_SingleGuid = pr.UID_ITShopOrg and pr.ITShopInfo = 'PR' join BaseTreeHasObject5 bho on n.UID_SingleGuid = bho.UID_Org where dbo.QBM_FGIGuidIsValid(pr.UID_ITShopOrg) & 2 = 0 and bho.InheritInfo = 1 select @ElementCount = @@ROWCOUNT6 select @ElementIndex = 1 insert into @ObjectKeyElements(Parameter1) select bu.ObjectKey1 from @ElementBuffer bu exec QER_PITShopProductNodeCreate_b @UID_OrgBOTarget7, @ObjectKeyElements, @GenProcID while @ElementIndex <= @ElementCount begin select top 1 @UID_OrgPRSource = bu.UID1 from @ElementBuffer bu where bu.ElementIndex8 = @ElementIndex exec QER_PITShopProductNodeMove @UID_OrgPRSource, @UID_OrgBOTarget select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd9 default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende: return end 10