dbo.CPL_PRuleCompareAffectedPerson
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:18.057 · modified 2026-04-14T23:20:45.863 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@WhereClauseOld | nvarchar | no |
@WhereClauseNew | nvarchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| QBM_PExecuteSQLWithRetry_LLP | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| 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 CPL_PRuleCompareAffectedPerson(@WhereClauseOld nvarchar(max) , @WhereClauseNew nvarchar(max) ) as begin SET XACT_ABORT OFF 2BEGIN TRY declare @SQLCmd nvarchar(max) select @SQLCmd = N'select isnull(a.lastname, N''+++''), isnull(a.firstname, N''+++''), isnull(b.lastname, N''---'') , isnull(b.firstname,N''---'') 3 from 4 ( 5 select uid_person, lastname, firstname 6 from person 7 where ' 8 + @WhereClauseOld + ' -- userquery alt 9 10 ) as a full outer join 11 ( 12 select uid_person, lastname, firstname 13 from person 14 where ' + 15@WhereClauseNew + ' -- userquery neu 16 17 ) as b on a.uid_person = b.uid_person 18 ' exec QBM_PExecuteSQLWithRetry_LLP @SQLStatement = @SQLcmd , @LockTimeout_ms 19 = default , @MaxWaitTimeForLock_s = default , @ProcIDForJournal = @@procid , @HandleErrorSilent = 0 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default 20 declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel: end 21
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:45.863
has TRY/CATCH error handling
Summary: calls QBM_PExecuteSQLWithRetry_LLP, QBM_PSessionErrorAdd; reads/joins person
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@WhereClauseOld | nvarchar | input |
@WhereClauseNew | nvarchar | input |
DML targets
None extracted.Called 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: @WhereClauseOld @WhereClauseNew @SQLCmd @SQLStatement @SQLcmd @LockTimeout_ms @MaxWaitTimeForLock_s @ProcIDForJournal @procid @HandleErrorSilent @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.
No reverse dependencies extracted.