dbo.ATT_PAttestationCaseDeleteOld

SQL_STORED_PROCEDURE

Created 2025-06-27T18:01:11.770 · modified 2026-04-14T23:20:42.807 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@UID_AttestationPolicyvarcharno
@CaseWhereClausenvarcharno

Referenced objects

SchemaObjectColumn/minorClass
ATT_P47650F5671BCBA8B679125E_OBJECT_OR_COLUMN
AttestationPolicyOBJECT_OR_COLUMN
DialogColumnOBJECT_OR_COLUMN
QBM_PDBQueueInsert_SingleOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YParameterListTYPE
dboQBM_FGIConfigparmValueOBJECT_OR_COLUMN
dboQBM_FGISessionContextOBJECT_OR_COLUMN
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

1create   procedure ATT_PAttestationCaseDeleteOld ( @UID_AttestationPolicy varchar(38) , @CaseWhereClause nvarchar(max) = null  ) as begin declare
2 @LimitOfOldCases int declare @IsInActive bit declare @lauf int declare @GenProcID varchar(38) declare @SQLCmd nvarchar(max) declare @GivenObjects QBM_YParameterList
3 SET XACT_ABORT OFF BEGIN TRY select @GenProcID = dbo.QBM_FGISessionContext('') select top 1 @LimitOfOldCases = LimitOfOldCases , @IsInActive = IsInActive
4 from AttestationPolicy where UID_AttestationPolicy = @UID_AttestationPolicy if isnull(@LimitOfOldCases, 0) < 1 and @IsInActive = 0 begin goto ende end
5 if '' = dbo.QBM_FGIConfigparmValue (N'Common\ProcessState\PropertyLog') and @IsInActive = 0 begin goto ende end if (select count(*) from DialogColumn 
6where UID_DialogTable = 'ATT-T-AttestationHistory' and istowatchDelete = 1 ) < 3 and @IsInActive = 0 begin goto ende end if (select count(*) from DialogColumn
7 where UID_DialogTable = 'ATT-T-AttestationCase' and istowatchDelete = 1 ) < 3 and @IsInActive = 0 begin goto ende end if @CaseWhereClause > ' ' begin 
8select @SQLCmd = concat('	select ObjectKeyBase
9		from AttestationCase
10		where UID_AttestationPolicy = ''', @UID_AttestationPolicy, '''
11		and ', @CaseWhereClause
12, '
13') insert into @GivenObjects(Parameter1) exec sp_executeSQl @SQLCmd  end   select @lauf = 1 while @lauf > 0 begin exec @lauf = ATT_P47650F5671BCBA8B679125E_
14 @UID_AttestationPolicy , @CaseWhereClause , @LimitOfOldCases , @GivenObjects      end   ende:  exec QBM_PDBQueueInsert_Single 'ATT-K-AttestationRunDeleteOld'
15, '', '', @GenProcID END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR 
16(@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel:  set lock_timeout -1 return end 
17

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.807

inserts DBQueue tasks uses session context values has TRY/CATCH error handling

Summary: calls ATT_P47650F5671BCBA8B679125E_, QBM_PDBQueueInsert_Single, QBM_PSessionErrorAdd; writes INSERT into; reads/joins AttestationPolicy, DialogColumn, AttestationCase

Declared parameters

ParameterTypeDirection
@UID_AttestationPolicyvarchar(38)input
@CaseWhereClausenvarcharinput

DML targets

INSERT into

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

ATT-K-AttestationRunDeleteOld

Temp tables / referenced variables

Temp: None extracted.

Variables: @UID_AttestationPolicy @CaseWhereClause @LimitOfOldCases @IsInActive @lauf @GenProcID @SQLCmd @GivenObjects @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_ZHelperAttestationPolicySQL expression dependencyOBJECT_OR_COLUMN
dbo.ATT_ZHelperAttestationPolicysource text referencehas TRY/CATCH error handling