Back to OIM Explorer

dbo.RMB_ZAllForPersonInBaseTree

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure.

Source: sandbox-db sys.sql_modules

Source size: 889 characters

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.QER_FGIOrgRootName source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL42 lines
1CREATE PROCEDURE RMB_ZAllForPersonInBaseTree(2  @SlotNumber int3)4AS5BEGIN6  DECLARE @GenProcID varchar(38)7  DECLARE @Parameter nvarchar(1000)8  DECLARE @Ident_OrgRoot nvarchar(64)9  DECLARE @ElementBuffer QBM_YCursorBuffer10  DECLARE @ElementCount int11  DECLARE @ElementIndex int12  BEGIN TRY13    INSERT INTO @ElementBuffer(Ident1,14    UID1)15    SELECT16      DISTINCT dbo.QER_FGIOrgRootName(b.UID_OrgRoot),17      p.GenProcID18    FROM QBMDBQueueCurrent p19      WITH(readpast)20    JOIN BaseTree b21      ON p.UID_SubParameter = b.UID_Org AND p.SlotNumber = @SlotNumber22    SELECT @ElementCount = @@ROWCOUNT23    SELECT @ElementIndex = 124    WHILE @ElementIndex <= @ElementCount25    BEGIN26      SELECT27        TOP 1 @Ident_OrgRoot = bu.Ident1,28        @GenProcID = bu.UID129      FROM @ElementBuffer bu30      WHERE31        bu.ElementIndex = @ElementIndex32      SELECT @ElementIndex += 133    END34  END TRY35  BEGIN CATCH36    EXEC QBM_PSessionErrorAdd DEFAULT37    RAISERROR('',38    18,39    1)40      WITH NOWAIT41  END CATCH42END
Open raw exported source
SQL ยท Raw7 lines
1     create   procedure RMB_ZAllForPersonInBaseTree (@SlotNumber int) as begin  declare @GenProcID varchar(38) declare @Parameter nvarchar(1000)2 declare @Ident_OrgRoot nvarchar(64) declare @ElementBuffer QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int BEGIN TRY  insert into3 @ElementBuffer (Ident1, UID1)  select distinct dbo.QER_FGIOrgRootName(b.UID_OrgRoot), p.GenProcID from QBMDBQueueCurrent p with (readpast) join BaseTree4 b on p.UID_SubParameter = b.UID_Org and p.SlotNumber = @SlotNumber select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount5 begin select top 1 @Ident_OrgRoot = bu.Ident1 , @GenProcID = bu.UID1 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex  select @ElementIndex6 += 1 end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 7