Back to OIM Explorer

dbo.QER_ZITShopCheckStructure

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure. Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 9; Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 9; Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 16; References QBM_PDBQueueInsert_Bulk

Source: sandbox-db sys.sql_modules

Source size: 2.737 characters

Interpretation

  • Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
  • DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.

Relations

  • Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 9
  • Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 9
  • Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 16
  • References QBM_PDBQueueInsert_Bulk

Typed Edges

  • queues DBQueue task QER_ZITShopCheckMethodBO at line 9 Bulk DBQueue insert -> QER-K-ShoppingRackMethod / QER_ZITShopCheckMethodBO at line 9
  • queues DBQueue task QER_ZITShopCheckMethodPR at line 9 Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 9
  • queues DBQueue task QER_ZITShopCheckMethodPR at line 16 Bulk DBQueue insert -> QER-K-ShoppingRackProductNode / QER_ZITShopCheckMethodPR at line 16
  • references source dbo.QBM_PDBQueueInsert_Bulk source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • references source dbo.QER_ZITShopCheck source text reference
  • queues DBQueue task QER-K-ShoppingRackMethod -> QER_ZITShopCheckMethodBO QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackMethod', @DBQueueElements_01 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, x.GenProcID from ( select p.uid_org as u…
  • queues DBQueue task QER-K-ShoppingRackProductNode -> QER_ZITShopCheckMethodPR QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackProductNode', @DBQueueElements_02 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: end

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL132 lines
1CREATE PROCEDURE QER_ZITShopCheckStructure(2  @SlotNumber int3)4AS5BEGIN6  DECLARE @DBQueueCurrent QBM_YDBQueueCurrent7  BEGIN TRY8    INSERT INTO @DBQueueCurrent(UID_DialogDBQueue,9    UID_Parameter,10    UID_SubParameter,11    GenProcID)12    SELECT13      UID_DialogDBQueue,14      UID_Parameter,15      UID_SubParameter,16      GenProcID17    FROM QBMDBQueueCurrent cu18      WITH(readpast)19    WHERE20      cu.SlotNumber = @SlotNumber21    IF @@rowcount = 022    BEGIN23      GOTO EndLabel24    END25    DECLARE @DBQueueElements_01 QBM_YDBQueueRaw26    INSERT INTO @DBQueueElements_01(object,27    subobject,28    genprocid)29    SELECT30      x.uid,31      NULL,32      x.GenProcID33    FROM(34    SELECT35      o.uid_org AS uid,36      x.GenProcID37    FROM @DBQueueCurrent x38    JOIN BaseTree o39      ON x.uid_parameter = o.uid_org AND o.ITShopInfo = 'BO'40    UNION41    SELECT42      x.uid_parameter,43      x.GenProcID44    FROM @DBQueueCurrent x45    WHERE46      NOT EXISTS(47    SELECT TOP 1 148    FROM BaseTree49    WHERE50      uid_org = x.uid_parameter)51    UNION52    SELECT53      b.uid_org,54      x.GenProcID55    FROM @DBQueueCurrent x56    JOIN BaseTree o57      ON x.uid_parameter = o.uid_org AND o.ITShopInfo = 'SH'58    JOIN BaseTree b59      ON b.uid_parentorg = o.uid_org AND b.ITShopInfo = 'BO'60    UNION61    SELECT62      b.uid_org,63      x.GenProcID64    FROM @DBQueueCurrent x65    JOIN BaseTree o66      ON x.uid_parameter = o.uid_org AND o.ITShopInfo = 'SC'67    JOIN BaseTree s68      ON s.uid_parentorg = o.uid_org AND s.ITShopInfo = 'SH'69    JOIN BaseTree b70      ON b.uid_parentorg = s.uid_org AND b.ITShopInfo = 'BO') AS x71    EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackMethod',72      @DBQueueElements_0173    DECLARE @DBQueueElements_02 QBM_YDBQueueRaw74    INSERT INTO @DBQueueElements_02(object,75    subobject,76    genprocid)77    SELECT78      x.uid,79      NULL,80      x.GenProcID81    FROM(82    SELECT83      p.uid_org AS uid,84      x.GenProcID85    FROM @DBQueueCurrent x86    JOIN BaseTree p87      ON x.uid_parameter = p.uid_org AND p.ITShopInfo = 'PR'88    UNION89    SELECT90      p.uid_org AS uid,91      x.GenProcID92    FROM @DBQueueCurrent x93    JOIN BaseTree o94      ON x.uid_parameter = o.uid_org AND o.ITShopInfo = 'BO'95    JOIN BaseTree p96      ON p.uid_parentorg = o.uid_org AND p.ITShopInfo = 'PR'97    UNION98    SELECT99      p.uid_org,100      x.GenProcID101    FROM @DBQueueCurrent x102    JOIN BaseTree o103      ON x.uid_parameter = o.uid_org AND o.ITShopInfo = 'SH'104    JOIN BaseTree b105      ON b.uid_parentorg = o.uid_org AND b.ITShopInfo = 'BO'106    JOIN BaseTree p107      ON p.uid_parentorg = b.uid_org AND p.ITShopInfo = 'PR'108    UNION109    SELECT110      p.uid_org,111      x.GenProcID112    FROM @DBQueueCurrent x113    JOIN BaseTree o114      ON x.uid_parameter = o.uid_org AND o.ITShopInfo = 'SC'115    JOIN BaseTree s116      ON s.uid_parentorg = o.uid_org AND s.ITShopInfo = 'SH'117    JOIN BaseTree b118      ON b.uid_parentorg = s.uid_org AND b.ITShopInfo = 'BO'119    JOIN BaseTree p120      ON p.uid_parentorg = b.uid_org AND p.ITShopInfo = 'PR') AS x121    EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackProductNode',122      @DBQueueElements_02123  END TRY124  BEGIN CATCH125    EXEC QBM_PSessionErrorAdd DEFAULT126    RAISERROR('',127    18,128    1)129      WITH NOWAIT130  END CATCH131  endLabel:132END
Open raw exported source
SQL · Raw19 lines
1    create   procedure QER_ZITShopCheckStructure (@SlotNumber int) as begin  declare @DBQueueCurrent QBM_YDBQueueCurrent BEGIN TRY insert into @DBQueueCurrent2(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent3 cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount = 0 begin goto EndLabel end declare @DBQueueElements_01 QBM_YDBQueueRaw insert into4 @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, x.GenProcID from ( select o.uid_org as uid , x.GenProcID from @DBQueueCurrent x5 join BaseTree o on x.uid_parameter = o.uid_org and o.ITShopInfo = 'BO' union  select x.uid_parameter , x.GenProcID from @DBQueueCurrent x where not exists6 (select top 1 1 from BaseTree where uid_org = x.uid_parameter ) union  select b.uid_org, x.GenProcID from @DBQueueCurrent x join BaseTree o on x.uid_parameter7 = o.uid_org and o.ITShopInfo = 'SH' join BaseTree b on b.uid_parentorg = o.uid_org and b.ITShopInfo = 'BO' union  select b.uid_org, x.GenProcID from @DBQueueCurrent8 x join BaseTree o on x.uid_parameter = o.uid_org and o.ITShopInfo = 'SC' join BaseTree s on s.uid_parentorg = o.uid_org and s.ITShopInfo = 'SH' join BaseTree9 b on b.uid_parentorg = s.uid_org and b.ITShopInfo = 'BO' ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackMethod', @DBQueueElements_01 declare @DBQueueElements_0210 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, x.GenProcID from (  select p.uid_org as uid , x.GenProcID11 from @DBQueueCurrent x join BaseTree p on x.uid_parameter = p.uid_org and p.ITShopInfo = 'PR' union  select p.uid_org as uid , x.GenProcID from @DBQueueCurrent12 x join BaseTree o on x.uid_parameter = o.uid_org and o.ITShopInfo = 'BO' join BaseTree p on p.uid_parentorg = o.uid_org and p.ITShopInfo = 'PR' union 13 select p.uid_org, x.GenProcID from @DBQueueCurrent x join BaseTree o on x.uid_parameter = o.uid_org and o.ITShopInfo = 'SH' join BaseTree b on b.uid_parentorg14 = o.uid_org and b.ITShopInfo = 'BO' join BaseTree p on p.uid_parentorg = b.uid_org and p.ITShopInfo = 'PR' union  select p.uid_org, x.GenProcID from @DBQueueCurrent15 x join BaseTree o on x.uid_parameter = o.uid_org and o.ITShopInfo = 'SC' join BaseTree s on s.uid_parentorg = o.uid_org and s.ITShopInfo = 'SH' join BaseTree16 b on b.uid_parentorg = s.uid_org and b.ITShopInfo = 'BO' join BaseTree p on p.uid_parentorg = b.uid_org and p.ITShopInfo = 'PR' ) as x exec QBM_PDBQueueInsert_Bulk17 'QER-K-ShoppingRackProductNode', @DBQueueElements_02 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH18 endLabel: end 19