dbo.TSB_ZUNSGroupBInUNSGroupB_C
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
- references source dbo.TSB_ZUNSGroupBInUNSGroupB source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE TSB_ZUNSGroupBInUNSGroupB_C(2 @SlotNumberDummy int,3 @dummy1 varchar(38),4 @Dummy2 varchar(38),5 @GenProcIDDummy varchar(38)6)7AS8BEGIN9 BEGIN TRY10 UPDATE UNSGroupBCollection11 SET IsCircular = 112 FROM UNSGroupBCollection co13 WHERE14 co.UID_UNSGroupBChild <> co.UID_UNSGroupBParent AND EXISTS(15 SELECT TOP 1 116 FROM UNSGroupBCollection ce17 WHERE18 co.UID_UNSGroupBChild = ce.UID_UNSGroupBParent AND co.UID_UNSGroupBParent = ce.UID_UNSGroupBChild) AND IsCircular = 019 UPDATE UNSGroupBCollection20 SET IsCircular = 021 FROM UNSGroupBCollection co22 WHERE23 co.UID_UNSGroupBChild <> co.UID_UNSGroupBParent AND NOT EXISTS(24 SELECT TOP 1 125 FROM UNSGroupBCollection ce26 WHERE27 co.UID_UNSGroupBChild = ce.UID_UNSGroupBParent AND co.UID_UNSGroupBParent = ce.UID_UNSGroupBChild) AND IsCircular = 128 UPDATE UNSGroupBCollection29 SET IsCircular = 130 FROM UNSGroupBCollection co31 WHERE32 co.UID_UNSGroupBChild = co.UID_UNSGroupBParent AND EXISTS(33 SELECT TOP 1 134 FROM UNSGroupBCollection ce35 WHERE36 co.UID_UNSGroupBParent = ce.UID_UNSGroupBParent AND ce.UID_UNSGroupBChild <> ce.UID_UNSGroupBParent AND IsCircular = 1) AND IsCircular =37 038 UPDATE UNSGroupBCollection39 SET IsCircular = 040 FROM UNSGroupBCollection co41 WHERE42 co.UID_UNSGroupBChild = co.UID_UNSGroupBParent AND NOT EXISTS(43 SELECT TOP 1 144 FROM UNSGroupBCollection ce45 WHERE46 co.UID_UNSGroupBParent = ce.UID_UNSGroupBParent AND ce.UID_UNSGroupBChild <> ce.UID_UNSGroupBParent AND IsCircular = 1) AND IsCircular =47 148 UPDATE UNSGroupBCollection49 SET IsCircular = x.IsCircular50 FROM UNSGroupBCollection co51 JOIN(52 SELECT53 y.UID_UNSGroupBChild,54 y.IsCircular55 FROM UNSGroupBCollection y56 WHERE57 y.UID_UNSGroupBChild = y.UID_UNSGroupBParent) AS x58 ON x.UID_UNSGroupBChild = co.UID_UNSGroupBChild59 WHERE60 co.IsCircular <> x.IsCircular61 END TRY62 BEGIN CATCH63 EXEC QBM_PSessionErrorAdd DEFAULT64 RAISERROR('',65 18,66 1)67 WITH NOWAIT68 END CATCH69 ende:70 RETURN71END
Open raw exported source
1 create procedure TSB_ZUNSGroupBInUNSGroupB_C ( @SlotNumberDummy int , @dummy1 varchar(38) , @Dummy2 varchar(38) , @GenProcIDDummy2 varchar(38) ) as begin BEGIN TRY update UNSGroupBCollection set IsCircular = 1 from UNSGroupBCollection co where co.UID_UNSGroupBChild <> co.UID_UNSGroupBParent3 and exists (select top 1 1 from UNSGroupBCollection ce where co.UID_UNSGroupBChild = ce.UID_UNSGroupBParent and co.UID_UNSGroupBParent = ce.UID_UNSGroupBChild4 ) and IsCircular = 0 update UNSGroupBCollection set IsCircular = 0 from UNSGroupBCollection co where co.UID_UNSGroupBChild <> co.UID_UNSGroupBParent5 and not exists (select top 1 1 from UNSGroupBCollection ce where co.UID_UNSGroupBChild = ce.UID_UNSGroupBParent and co.UID_UNSGroupBParent6 = ce.UID_UNSGroupBChild ) and IsCircular = 1 update UNSGroupBCollection set IsCircular = 1 from UNSGroupBCollection co where co.UID_UNSGroupBChild7 = co.UID_UNSGroupBParent and exists (select top 1 1 from UNSGroupBCollection ce where co.UID_UNSGroupBParent = ce.UID_UNSGroupBParent and 8ce.UID_UNSGroupBChild <> ce.UID_UNSGroupBParent and IsCircular = 1 ) and IsCircular = 0 update UNSGroupBCollection set IsCircular = 0 from UNSGroupBCollection9 co where co.UID_UNSGroupBChild = co.UID_UNSGroupBParent and not exists (select top 1 1 from UNSGroupBCollection ce where co.UID_UNSGroupBParent10 = ce.UID_UNSGroupBParent and ce.UID_UNSGroupBChild <> ce.UID_UNSGroupBParent and IsCircular = 1 ) and IsCircular = 1 update UNSGroupBCollection11 set IsCircular = x.IsCircular from UNSGroupBCollection co join (select y.UID_UNSGroupBChild, y.IsCircular from UNSGroupBCollection y where y.UID_UNSGroupBChild12 = y.UID_UNSGroupBParent ) as x on x.UID_UNSGroupBChild = co.UID_UNSGroupBChild where co.IsCircular <> x.IsCircular END TRY BEGIN CATCH exec 13QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 14