dbo.QBM_PProcessGroupCreate_help
SQL_STORED_PROCEDURE
Created 2025-06-27T17:57:37.157 · modified 2026-04-14T23:20:32.127 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@DebugSwitch | int | no |
@BlockSizeWork | int | no |
@GesamtAnzahl | int | yes |
@XUser | nvarchar | no |
@Xdate | datetime | no |
@LimitTotal | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogProcess | OBJECT_OR_COLUMN | ||
| DialogProcessSubstitute | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure QBM_PProcessGroupCreate_help( @DebugSwitch int , @BlockSizeWork int , @GesamtAnzahl int output , @XUser nvarchar(64) , @Xdate 2 datetime , @LimitTotal int ) as begin declare @laufInnen int declare @AnzahlInnerLoopCycles int = 0 declare @BisherGefuellt int = 0 create table #sammler_0 3 ( GenProcID varchar(38) collate database_default NULL , GenProcIDGroup varchar(38) collate database_default NULL , index QBM_YProcessGroupCreate1 (GenProcID 4, GenProcIDGroup) , index QBM_YProcessGroupCreate2 (GenProcIDGroup, GenProcID) ) create table #sammler ( GenProcID varchar(38) collate database_default 5 NULL , GenProcIDGroup varchar(38) collate database_default NULL , index QBM_YProcessGroupCreate1 (GenProcID, GenProcIDGroup) , index QBM_YProcessGroupCreate2 6 (GenProcIDGroup, GenProcID) ) zuruecksetzen: insert into #sammler_0 (GenProcID, GenProcIDGroup) select p.GenProcID, isnull(su.GenProcIDNew, p.GenProcID 7) as GenProcIDGroup from ( select top ( @BlockSizeWork) a.UID_SingleGuid as GenProcID from #DialogProcessMirror a where a.BitProperty = 0 and a.IntProperty 8 = 2 order by a.XdateUpdated asc ) p left outer join DialogProcessSubstitute su on p.GenProcID = su.GenProcIDOrigin select @BisherGefuellt = @@ROWCOUNT 9 if (@BisherGefuellt > @LimitTotal / 25 or @BisherGefuellt > @BlockSizeWork * 3) and @BlockSizeWork >= 10 begin truncate table #sammler_0 truncate 10 table #sammler select @BlockSizeWork /= 10 if @DebugSwitch > 0 begin print concat('@BlockSizeWork (1) reduziert auf ', str(@BlockSizeWork)) end goto 11zuruecksetzen end insert into #sammler_0 (GenProcID, GenProcIDGroup) select a.GenProcIDOrigin, a.GenProcIDNew from ( select su.GenProcIDOrigin, su.GenProcIDNew 12 from #sammler_0 s join DialogProcessSubstitute su on s.GenProcIDGroup = su.GenProcIDNew group by su.GenProcIDOrigin, su.GenProcIDNew ) as a left outer 13 join #sammler_0 e on e.GenProcID = a.GenProcIDOrigin and e.GenProcIDGroup = a.GenProcIDNew where e.GenProcID is null select @BisherGefuellt += @@rowcount 14 if (@BisherGefuellt > @LimitTotal / 25 or @BisherGefuellt > @BlockSizeWork * 4) and @BlockSizeWork >= 10 begin truncate table #sammler_0 truncate 15 table #sammler select @BlockSizeWork /= 10 if @DebugSwitch > 0 begin print concat('@BlockSizeWork (2) reduziert auf ', str(@BlockSizeWork)) end goto 16zuruecksetzen end insert into #sammler (GenProcID, GenProcIDGroup) select a.GenProcID, a.GenProcIDGroup from ( select s3.GenProcID as GenProcID, v.GruppeAlt 17 as GenProcIDGroup from ( select s.GenProcIDGroup as GruppeAlt, s2.GenProcIDGroup as GruppeNeu from #sammler_0 s join #sammler_0 s2 on s.GenProcID = 18s2.GenProcID and s.GenProcIDGroup <> s2.GenProcIDGroup group by s.GenProcIDGroup, s2.GenProcIDGroup ) as v join #sammler_0 s3 on v.GruppeNeu = s3.GenProcIDGroup 19 union select e.GenProcID, e.GenProcIDGroup from #sammler_0 e ) as a select @BisherGefuellt = @@ROWCOUNT if (@BisherGefuellt > @LimitTotal 20 / 25 or @BisherGefuellt > @BlockSizeWork * 5) and @BlockSizeWork >= 10 begin truncate table #sammler_0 truncate table #sammler select @BlockSizeWork /= 21 10 if @DebugSwitch > 0 begin print concat('@BlockSizeWork (3) reduziert auf ', str(@BlockSizeWork)) end goto zuruecksetzen end select @laufInnen = 1 22select @AnzahlInnerLoopCycles = 0 while @laufInnen > 0 begin select @laufInnen = 0 insert into #sammler (GenProcID, GenProcIDGroup) select a.GenProcID 23, a.GenProcIDGroup from ( select x.GenProcID, x.GenProcIDGroup from ( select su.GenProcIDOrigin as GenProcID, s.GenProcIDGroup from #sammler s join DialogProcessSubstitute 24 su on s.GenProcIDGroup = su.GenProcIDNew ) as x group by x.GenProcID, x.GenProcIDGroup ) as a left outer join #sammler e on e.GenProcID = a.GenProcID 25where e.GenProcID is null select @laufInnen += @@rowcount insert into #sammler (GenProcID, GenProcIDGroup) select a.GenProcID, a.GenProcIDGroup from ( 26 select x.GenProcID, x.GenProcIDGroup from ( select su.GenProcIDNew as GenProcID, s.GenProcIDGroup from #sammler s join DialogProcessSubstitute su on 27s.GenProcIDGroup = su.GenProcIDOrigin ) as x group by x.GenProcID, x.GenProcIDGroup )as a left outer join #sammler e on e.GenProcID = a.GenProcID where 28 e.GenProcID is null select @laufInnen += @@rowcount insert into #sammler (GenProcID, GenProcIDGroup) select a.GenProcID, a.GenProcIDGroup from ( select 29 x.GenProcID, x.GenProcIDGroup from ( select su.GenProcIDNew as GenProcID, s.GenProcIDGroup from #sammler s join DialogProcessSubstitute su on s.GenProcID 30 = su.GenProcIDOrigin ) as x group by x.GenProcID, x.GenProcIDGroup )as a left outer join #sammler e on e.GenProcID = a.GenProcID where e.GenProcID is 31null select @laufInnen += @@rowcount insert into #sammler (GenProcID, GenProcIDGroup) select a.GenProcID, a.GenProcIDGroup from ( select x.GenProcID, 32x.GenProcIDGroup from ( select distinct su.GenProcIDOrigin as GenProcID, s.GenProcIDGroup from #sammler s join DialogProcessSubstitute su on s.GenProcID 33 = su.GenProcIDNew ) as x group by x.GenProcID, x.GenProcIDGroup )as a left outer join #sammler e on e.GenProcID = a.GenProcID where e.GenProcID is null 34 select @laufInnen += @@rowcount select @AnzahlInnerLoopCycles += 1 if @DebugSwitch > 0 begin print concat('Anzahl in #sammler eingefügt', str(@laufInnen 35) ) end end if @DebugSwitch > 0 begin print concat('Anzahl der Läufe für -- 4) Überbrückungen finden ... ', str(@AnzahlInnerLoopCycles)) print '#sammler ergänzt' 36 if @DebugSwitch = 2 begin select * from #sammler end else begin select COUNT(*) from #sammler end end update DialogProcess set GenProcIDGroup = f.GenProcIDGroup 37 , XDateUpdated = @Xdate , XUserUpdated = @XUser from DialogProcess p join( select x.GenProcID , case when y.ReadySum > 0 then null else x.GenProcIDGroup 38 end as GenProcIDGroup from( select s.GenProcID , max(s.GenProcIDGroup) as GenProcIDGroup from #sammler s group by s.GenProcID ) as x join( select s.GenProcIDGroup 39 , sum(sign(p.ReadyForDeleteOrExport^2)) as ReadySum from #sammler s join DialogProcess p on s.GenProcID = p.GenProcID group by s.GenProcIDGroup ) as y 40 on x.GenProcIDGroup = y.GenProcIDGroup ) as f on p.GenProcID = f.GenProcID select @gesamtanzahl += @@rowcount update #DialogProcessMirror set BitProperty 41 = 1 from #DialogProcessMirror m join #sammler s on m.UID_SingleGuid = s.GenProcID if @DebugSwitch > 0 begin print 'DialogProcess aktualisiert' if @DebugSwitch 42 = 2 begin select ReadyForDeleteORExport,GenProcIDGroup,* from DialogProcess end else begin select COUNT(*) from #DialogProcessMirror where BitProperty 43 = 1 end end end 44
Module relation graph
Loading module relation graph…
Source-derived context
Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.
provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:20:32.127
None extracted.
Summary: writes INSERT into, UPDATE DialogProcess; reads/joins DialogProcessSubstitute, DialogProcess
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@DebugSwitch | int | input |
@BlockSizeWork | int | input |
@GesamtAnzahl | int | OUTPUT |
@XUser | nvarchar(64) | input |
@Xdate | datetime | input |
@LimitTotal | int | input |
DML targets
INSERT into UPDATE DialogProcessCalled routines
None extracted.
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: #sammler_0 #sammler #DialogProcessMirror
Variables: @DebugSwitch @BlockSizeWork @GesamtAnzahl @XUser @Xdate @LimitTotal @laufInnen @AnzahlInnerLoopCycles @BisherGefuellt @ROWCOUNT @rowcount @gesamtanzahl
Referenced by / reverse dependencies
Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.
| Referencing object | Relation | Evidence |
|---|---|---|
| dbo.QBM_PProcessGroupCreate | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PProcessGroupCreate | source text reference | has TRY/CATCH error handling |