dbo.ATT_ZAttestationWzParmPreProp
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_FGIPrepropConditionDeactiv source text reference
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PSessionContextSet source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
- dbo.QBM_FGIPrepropConditionDeactiv
- dbo.QBM_FGISessionContext
- dbo.QBM_PSessionContextSet
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE ATT_ZAttestationWzParmPreProp(2 @SlotNumber int3)4AS5BEGIN6 DECLARE @GenProcID varchar(38)7 DECLARE @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('')8 DECLARE @DBQueueCurrent QBM_YDBQueueCurrent9 BEGIN TRY10 INSERT INTO @DBQueueCurrent(UID_DialogDBQueue,11 UID_Parameter,12 UID_SubParameter,13 GenProcID)14 SELECT15 UID_DialogDBQueue,16 UID_Parameter,17 UID_SubParameter,18 GenProcID19 FROM QBMDBQueueCurrent cu20 WITH(readpast)21 WHERE22 cu.SlotNumber = @SlotNumber23 IF @@rowcount = 024 BEGIN25 GOTO EndLabel26 END27 SELECT @GenProcID = max(GenProcID)28 FROM @DBQueueCurrent29 WHERE30 GenProcID > ' '31 IF isnull(@Genprocid,32 '') = ''33 BEGIN34 SELECT @GenProcID = newid()35 END36 DECLARE @PrePropHelper QBM_YPrepropHelper37 INSERT INTO @PrePropHelper(uid_parameter,38 isDeactivatedPrior,39 IsDeactivated,40 GenProcID,41 PreProcessorCondition,42 IsDeactivatedOld)43 SELECT44 x.uid_parameter,45 isnull(t.isDeactivatedByPreProcessor,46 0),47 isnull(t.isDeactivatedByPreProcessor,48 0),49 x.GenProcID,50 isnull(c.PreProcessorCondition,51 N ''),52 c.isDeactivatedByPreProcessor53 FROM @DBQueueCurrent x54 JOIN AttestationWizardParm c55 ON x.uid_parameter = c.uid_AttestationWizardParm56 JOIN AttestationObject t57 ON c.UID_AttestationObject = t.UID_AttestationObject58 UPDATE @PrePropHelper59 SET IsDeactivated = dbo.QBM_FGIPrepropConditionDeactiv(h.PreProcessorCondition)60 FROM @PrePropHelper h61 WHERE62 h.PreProcessorCondition > ' ' AND h.IsDeactivated = 063 EXEC QBM_PSessionContextSet 'GenProcID',64 @GenProcID65 UPDATE AttestationWizardParm66 SET IsDeactivatedByPreProcessor = x.isDeactivated,67 xdateupdated = GetUTCDate(),68 xuserupdated = 'DBScheduler'69 FROM AttestationWizardParm r70 JOIN @PrePropHelper x71 ON r.UID_AttestationWizardParm = x.uid_parameter72 WHERE73 r.IsDeactivatedByPreProcessor <> x.IsDeactivated74 END TRY75 BEGIN CATCH76 EXEC QBM_PSessionErrorAdd DEFAULT77 RAISERROR('',78 18,79 1)80 WITH NOWAIT81 END CATCH82 endLabel:83 EXEC QBM_PSessionContextSet 'GenProcID',84 @GenProcID_R85 RETURN86END
Open raw exported source
1 create procedure ATT_ZAttestationWzParmPreProp (@SlotNumber int) as begin declare @GenProcID varchar(38) declare @GenProcID_R varchar(38)2 = dbo.QBM_FGISessionContext('') declare @DBQueueCurrent QBM_YDBQueueCurrent BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter3, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber4 if @@rowcount = 0 begin goto EndLabel end select @GenProcID = max(GenProcID) from @DBQueueCurrent where GenProcID > ' ' if isnull(@Genprocid, '') = ''5 begin select @GenProcID = newid() end declare @PrePropHelper QBM_YPrepropHelper insert into @PrePropHelper (uid_parameter , isDeactivatedPrior , IsDeactivated6 , GenProcID , PreProcessorCondition, IsDeactivatedOld) select x.uid_parameter, isnull(t.isDeactivatedByPreProcessor,0), isnull(t.isDeactivatedByPreProcessor7,0), x.GenProcID, isnull(c.PreProcessorCondition,N''), c.isDeactivatedByPreProcessor from @DBQueueCurrent x join AttestationWizardParm c on x.uid_parameter8 = c.uid_AttestationWizardParm join AttestationObject t on c.UID_AttestationObject = t.UID_AttestationObject update @PrePropHelper set IsDeactivated =9 dbo.QBM_FGIPrepropConditionDeactiv(h.PreProcessorCondition) from @PrePropHelper h where h.PreProcessorCondition > ' ' and h.IsDeactivated = 0 exec10 QBM_PSessionContextSet 'GenProcID', @GenProcID update AttestationWizardParm set IsDeactivatedByPreProcessor = x.isDeactivated, xdateupdated = GetUTCDate11(), xuserupdated = 'DBScheduler' from AttestationWizardParm r join @PrePropHelper x on r.UID_AttestationWizardParm = x.uid_parameter where r.IsDeactivatedByPreProcessor12 <> x.IsDeactivated END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet13 'GenProcID', @GenProcID_R return end 14