dbo.ATT_P47650F5671BCBA8B679125E_
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:11.767 · modified 2026-04-14T23:20:42.800 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@UID_AttestationPolicy | varchar | no |
@CaseWhereClause | nvarchar | no |
@LimitOfOldCases | int | no |
@GivenObjects | QBM_YParameterList | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| AttestationCase | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YParameterList | TYPE | ||
| dbo | QBM_FGISessionErrorRethrow | 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 ATT_P47650F5671BCBA8B679125E_(@UID_AttestationPolicy varchar(38) , @CaseWhereClause nvarchar(max) , @LimitOfOldCases int 2, @GivenObjects QBM_YParameterList readonly ) as begin declare @work QBM_YParameterList declare @Ergebnis int = 1 SET XACT_ABORT OFF BEGIN TRY insert into 3 @work (Parameter2 ) select top 2000 dt.UID_AttestationCase from ( select c.UID_AttestationCase , ROW_NUMBER() over (partition by c.objectkeybase order 4 by c.xdateinserted desc) as rownumber from AttestationCase c with (readpast) join ( select ObjectKeyBase from AttestationCase with (readpast) where 5UID_AttestationPolicy = @UID_AttestationPolicy and IsClosed = 1 and ( @CaseWhereClause is null or ( @CaseWhereClause > ' ' and ObjectKeyBase in (select 6 Parameter1 from @GivenObjects) ) ) group by ObjectKeyBase having COUNT(*) > @LimitOfOldCases ) as ol on c.ObjectKeyBase = ol.ObjectKeyBase where c.UID_AttestationPolicy 7 = @UID_AttestationPolicy and c.IsClosed = 1 ) as dt where dt.rownumber > @LimitOfOldCases option (maxdop 1) select @Ergebnis = @@ROWCOUNT delete AttestationCase 8 from AttestationCase ac with(forceseek) join @work w on ac.UID_AttestationCase = w.Parameter2 option (maxdop 1) END TRY BEGIN CATCH exec QBM_PSessionErrorAdd 9 default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel: set lock_timeout 10 -1 return (@Ergebnis) end 11
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:42.800
has TRY/CATCH error handling
Summary: calls QBM_PSessionErrorAdd; writes INSERT into, DELETE AttestationCase; reads/joins AttestationCase
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@UID_AttestationPolicy | varchar(38) | input |
@CaseWhereClause | nvarchar | input |
@LimitOfOldCases | int | input |
@GivenObjects | qbm_yparameterlist | input |
DML targets
INSERT into DELETE AttestationCaseCalled 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: @UID_AttestationPolicy @CaseWhereClause @LimitOfOldCases @GivenObjects @work @Ergebnis @ROWCOUNT @Rethrow
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.ATT_PAttestationCaseDeleteOld | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.ATT_PAttestationCaseDeleteOld | source text reference | inserts DBQueue tasks, uses session context values, has TRY/CATCH error handling |