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.

Open formatted source/search result

Parameters

NameTypeOutput
@UID_AttestationPolicyvarcharno
@CaseWhereClausenvarcharno
@LimitOfOldCasesintno
@GivenObjectsQBM_YParameterListno

Referenced objects

SchemaObjectColumn/minorClass
AttestationCaseOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YParameterListTYPE
dboQBM_FGISessionErrorRethrowOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

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

ParameterTypeDirection
@UID_AttestationPolicyvarchar(38)input
@CaseWhereClausenvarcharinput
@LimitOfOldCasesintinput
@GivenObjectsqbm_yparameterlistinput

DML targets

INSERT into DELETE AttestationCase

Called routines

Read/join references

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 objectRelationEvidence
dbo.ATT_PAttestationCaseDeleteOldSQL expression dependencyOBJECT_OR_COLUMN
dbo.ATT_PAttestationCaseDeleteOldsource text referenceinserts DBQueue tasks, uses session context values, has TRY/CATCH error handling