dbo.QER_ZQERWorkingMethodCleanUp
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:06.707 · modified 2026-04-14T23:20:39.227 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotnumberDummy | int | no |
@Dummy1 | varchar | no |
@Dummy2 | varchar | no |
@Dummy3 | varchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| PersonWantsOrg | OBJECT_OR_COLUMN | ||
| PWODecisionSubMethod | OBJECT_OR_COLUMN | ||
| PWOHelperPWO | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YParameterList | TYPE | ||
| QERWorkingMethod | OBJECT_OR_COLUMN | ||
| QERWorkingStep | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVIntToString | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIModuleExists | 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 QER_ZQERWorkingMethodCleanUp ( @SlotnumberDummy int = 0 , @Dummy1 varchar(38) = null , @Dummy2 varchar(38) = null , @Dummy3 2 varchar(38) = null ) AS begin declare @SQLCMD nvarchar(max) declare @usedMethods QBM_YParameterList declare @UnUsedMethods QBM_YParameterList declare 3 @DebugSwitch int = 0 BEGIN TRY insert into @usedMethods(Parameter1, Parameter2) select m.UID_QERWorkingMethod, dbo.QBM_FCVIntToString( m.RevisionNumber 4) from PersonWantsOrg pwo join QERWorkingMethod m on pwo.UID_QERWorkingMethod = m.UID_QERWorkingMethod union select distinct m.UID_QERWorkingMethod, dbo.QBM_FCVIntToString 5( m.RevisionNumber) from PWOHelperPWO h join QERWorkingStep s on s.UID_QERWorkingStep = h.UID_QERWorkingStep join QERWorkingMethod m on s.UID_QERWorkingMethod 6 = m.UID_QERWorkingMethod if dbo.QBM_FGIModuleExists('ATT') = 1 begin select @SQLCMD = ' 7 select m.UID_QERWorkingMethod, dbo.QBM_FCVIntToString( m.RevisionNumber) 8 from AttestationCase pwo join QERWorkingMethod m on pwo.UID_QERWorkingMethod = m.UID_QERWorkingMethod 9 union 10 select m.UID_QERWorkingMethod, dbo.QBM_FCVIntToString( m.RevisionNumber) 11 from AttestationHelper h join QERWorkingStep s on s.UID_QERWorkingStep = h.UID_QERWorkingStep 12 join QERWorkingMethod m on s.UID_QERWorkingMethod = m.UID_QERWorkingMethod 13 ' 14 insert into @usedMethods(Parameter1, Parameter2) exec sp_executesql @SQLCmd end insert into @UnUsedMethods(Parameter1, Parameter2) select m.UID_QERWorkingMethod 15, dbo.QBM_FCVIntToString( m.RevisionNumber) from QERWorkingMethod m left outer join @usedMethods u on m.UID_QERWorkingMethod = u.Parameter1 where u.Parameter1 16 is null if @DebugSwitch > 0 begin print 'Used Methods' select * from @usedMethods print 'UnUsed Methods' select * from @UnUsedMethods end if @DebugSwitch 17 > 0 begin print 'Löschkandidaten' select m.UID_QERWorkingMethod, m.RevisionNumber, s.RevisionNumber from QERWorkingMethod m join @UnUsedMethods u on u.Parameter1 18 = m.UID_QERWorkingMethod join PWODecisionSubMethod s on m.UID_PWODecisionSubMethod = s.UID_PWODecisionSubMethod where m.RevisionNumber < s.RevisionNumber 19 end delete QERWorkingMethod from QERWorkingMethod m join @UnUsedMethods u on u.Parameter1 = m.UID_QERWorkingMethod left outer join PWODecisionSubMethod 20 s on m.UID_PWODecisionSubMethod = s.UID_PWODecisionSubMethod where m.RevisionNumber < isnull(s.RevisionNumber, 1073741824) END TRY BEGIN CATCH exec QBM_PSessionErrorAdd 21 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 22
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:39.227
has TRY/CATCH error handling
Summary: calls QBM_PSessionErrorAdd; writes INSERT into, DELETE QERWorkingMethod; reads/joins PersonWantsOrg, QERWorkingMethod, PWOHelperPWO, QERWorkingStep, AttestationCase…
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotnumberDummy | int | input |
@Dummy1 | varchar(38) | input |
@Dummy2 | varchar(38) | input |
@Dummy3 | varchar(38) | input |
DML targets
INSERT into DELETE QERWorkingMethodCalled routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @SlotnumberDummy @Dummy1 @Dummy2 @Dummy3 @SQLCMD @usedMethods @UnUsedMethods @DebugSwitch @SQLCmd
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.
No reverse dependencies extracted.