Back to OIM Explorer

dbo.CPL_PRuleCompareAffectedPerson

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure.

Source: sandbox-db sys.sql_modules

Source size: 1.025 characters

Interpretation

  • Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.

Relations

  • No extracted relations.

Typed Edges

  • references source dbo.QBM_FGISessionErrorRethrow source text reference
  • references source dbo.QBM_PExecuteSQLWithRetry_LLP source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL43 lines
1CREATE PROCEDURE CPL_PRuleCompareAffectedPerson(2  @WhereClauseOld nvarchar(max),3  @WhereClauseNew nvarchar(max)4)5AS6BEGIN7  SET XACT_ABORT OFF8  BEGIN TRY9    DECLARE @SQLCmd nvarchar(max)10    SELECT11      @SQLCmd = N 'select isnull(a.lastname, N''+++''), isnull(a.firstname, N''+++''), isnull(b.lastname, N''---'') , isnull(b.firstname,N''---'')12		from 13		(14			select uid_person, lastname, firstname 15			from person 16			where '17      + @WhereClauseOld + ' -- userquery alt1819		) as a full outer join 20		( 21			select uid_person, lastname, firstname  22			from person 23			where '24      + @WhereClauseNew + ' -- userquery neu2526		) as b on a.uid_person = b.uid_person27		'28    EXEC QBM_PExecuteSQLWithRetry_LLP @SQLStatement = @SQLcmd,29      @LockTimeout_ms = DEFAULT,30      @MaxWaitTimeForLock_s = DEFAULT,31      @ProcIDForJournal = @@procid,32      @HandleErrorSilent = 033  END TRY34  BEGIN CATCH35    EXEC QBM_PSessionErrorAdd DEFAULT36    DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()37    RAISERROR(@Rethrow,38    18,39    1)40      WITH NOWAIT41  END CATCH42  endLabel:43END
Open raw exported source
SQL ยท Raw21 lines
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 alt910		) as a full outer join 11		( 12			select uid_person, lastname, firstname  13			from person 14			where ' + 15@WhereClauseNew + ' -- userquery neu1617		) as b on a.uid_person = b.uid_person18		' exec QBM_PExecuteSQLWithRetry_LLP @SQLStatement = @SQLcmd , @LockTimeout_ms19 = default , @MaxWaitTimeForLock_s = default , @ProcIDForJournal = @@procid , @HandleErrorSilent = 0 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default20 declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel: end 21