Back to OIM Explorer

dbo.QBM_PBufferC_ProcessAll

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure.

Source: sandbox-db sys.sql_modules

Source size: 1.259 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.QBM_FGISessionErrorRethrow source text reference
  • references source dbo.QBM_PBufferC_ProcessOneColumn source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL60 lines
1CREATE PROCEDURE QBM_PBufferC_ProcessAll(2  @ModuleOwner varchar(3)3)4AS5BEGIN6  DECLARE @TableName varchar(30)7  DECLARE @columnname varchar(30)8  DECLARE @DebugSwitch int = 09  DECLARE @ColumnsToProcess QBM_YCursorBuffer10  DECLARE @ElementCount int11  DECLARE @ElementIndex int12  SET XACT_ABORT OFF13  BEGIN TRY14    INSERT INTO @ColumnsToProcess(Ident1,15    Ident2)16    SELECT17      y.TableName,18      y.columnname19    FROM(20    SELECT21      DISTINCT bu.TableName,22      bu.ColumnName23    FROM QBMBufferConfig bu) AS y24    LEFT25    OUTER26    JOIN QBM_VStartupTables s27      ON y.TableName = s.TableName28    ORDER BY isnull(s.SortOrder,29    1000),30    y.ColumnName31    SELECT @ElementCount = @@ROWCOUNT32    SELECT @ElementIndex = 133    WHILE @ElementIndex <= @ElementCount34    BEGIN35      SELECT36        TOP 1 @TableName = bu.Ident1,37        @columnname = bu.Ident238      FROM @ColumnsToProcess bu39      WHERE40        bu.ElementIndex = @ElementIndex41      IF @DebugSwitch > 042      BEGIN43        print '----------------------------------------------------' print ' processing ' + @TableName + ' ' + @columnname44      END45      EXEC QBM_PBufferC_ProcessOneColumn @TableName,46        @columnname,47        @ModuleOwner48      SELECT @ElementIndex += 149    END50  END TRY51  BEGIN CATCH52    EXEC QBM_PSessionErrorAdd DEFAULT53    DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()54    RAISERROR(@Rethrow,55    18,56    1)57      WITH NOWAIT58  END CATCH59  ende:60END
Open raw exported source
SQL ยท Raw10 lines
1     create   procedure QBM_PBufferC_ProcessAll (@ModuleOwner varchar(3)  ) as begin declare @TableName varchar(30) declare @columnname varchar(302) declare @DebugSwitch int = 0  declare @ColumnsToProcess QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int SET XACT_ABORT OFF BEGIN3 TRY insert into @ColumnsToProcess (Ident1  , Ident2 ) select y.TableName, y.columnname from (select distinct bu.TableName, bu.ColumnName from QBMBufferConfig4 bu ) as y left outer join QBM_VStartupTables s on y.TableName = s.TableName  order by isnull(s.SortOrder,1000) , y.ColumnName select @ElementCount = @@ROWCOUNT5 select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @TableName = bu.Ident1 , @columnname = bu.Ident2 from @ColumnsToProcess6 bu where bu.ElementIndex = @ElementIndex if @DebugSwitch > 0 begin print '----------------------------------------------------' print ' processing ' +7 @TableName + ' ' + @columnname end exec QBM_PBufferC_ProcessOneColumn @TableName , @columnname, @ModuleOwner select @ElementIndex += 1 end  END TRY BEGIN8 CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END 9CATCH ende: end 10