dbo.ATT_ZAttestationRunDeleteOld
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
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_PSessionErrorAdd source text reference
Complete Source
1CREATE PROCEDURE ATT_ZAttestationRunDeleteOld(2 @SlotNumberDummy int = 0,3 @UID_Dummy1 varchar(38) = '',4 @UID_Dummy2 varchar(38) = '',5 @GenProcID varchar(38) = ''6)7AS8BEGIN9 SET XACT_ABORT OFF10 BEGIN TRY11 SET lock_timeout 100012 BEGIN TRY13 DELETE AttestationRun14 FROM AttestationRun r15 WHERE16 NOT EXISTS(17 SELECT TOP 1 118 FROM AttestationCase ac19 WITH(nolock)20 WHERE21 ac.UID_AttestationRun = r.UID_AttestationRun)22 END TRY23 BEGIN CATCH24 END CATCH25 SET lock_timeout -126 END TRY27 BEGIN CATCH28 EXEC QBM_PSessionErrorAdd DEFAULT29 RAISERROR('',30 18,31 1)32 WITH NOWAIT33 END CATCH34 ende:35 RETURN36END
Open raw exported source
1 create procedure ATT_ZAttestationRunDeleteOld (@SlotNumberDummy int = 0 , @UID_Dummy1 varchar(38) = '' , @UID_Dummy2 varchar(38) = '' , @GenProcID2 varchar(38) = '' ) as begin SET XACT_ABORT OFF BEGIN TRY set lock_timeout 1000 begin try delete AttestationRun from AttestationRun r where not exists3 (select top 1 1 from AttestationCase ac with (nolock) where ac.UID_AttestationRun = r.UID_AttestationRun ) end try begin catch end catch set lock_timeout4 -1 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 5