dbo.QBM_PBufferT_DeleteNonlinear
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_FCVGUIDToModuleOwner source text reference
- references source dbo.QBM_FGISessionErrorRethrow source text reference
- references source dbo.QBM_PNonlinear_SetFound source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
Complete Source
1CREATE PROCEDURE QBM_PBufferT_DeleteNonlinear(2 @ModuleName varchar(3)3)4AS5BEGIN6 DECLARE @Missing QBM_YSingleObjectKey7 SET XACT_ABORT OFF8 BEGIN TRY9 INSERT INTO @Missing(SingleObjectKey)10 SELECT11 DISTINCT nd.ObjectKeyOwner12 FROM QBMNonLinearDepend nd CROSS apply string_split(nd.NeededModules,13 char(7)) x14 LEFT15 OUTER16 JOIN QBMModuleDef m17 ON m.ModuleName = x.value AND x.value > ' '18 WHERE19 m.UID_ModuleDef IS NULL AND dbo.QBM_FCVGUIDToModuleOwner(nd.uid_QBMNonLinearDepend) = @ModuleName option(recompile)20 DELETE QBMBufferTransfer21 FROM QBMBufferTransfer bt22 JOIN @Missing m23 ON bt.ObjectKeyOfRow = m.SingleObjectKey24 WHERE25 bt.ModuleName = @ModuleName option(recompile)26 EXEC QBM_PNonlinear_SetFound27 END TRY28 BEGIN CATCH29 EXEC QBM_PSessionErrorAdd DEFAULT30 DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()31 RAISERROR(@Rethrow,32 18,33 1)34 WITH NOWAIT35 END CATCH36END
Open raw exported source
1 create procedure QBM_PBufferT_DeleteNonlinear (@ModuleName varchar(3) ) as begin declare @Missing QBM_YSingleObjectKey SET XACT_ABORT OFF2 BEGIN TRY insert into @Missing(SingleObjectKey) select distinct nd.ObjectKeyOwner from QBMNonLinearDepend nd cross apply string_split( nd.NeededModules3, char(7)) x left outer join QBMModuleDef m on m.ModuleName = x.value and x.value > ' ' where m.UID_ModuleDef is null and dbo.QBM_FCVGUIDToModuleOwner4(nd.uid_QBMNonLinearDepend) = @ModuleName option (recompile) delete QBMBufferTransfer from QBMBufferTransfer bt join @Missing m on bt.ObjectKeyOfRow = 5m.SingleObjectKey where bt.ModuleName = @ModuleName option (recompile) exec QBM_PNonlinear_SetFound END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default6 declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH end 7