dbo.TSB_ZUNSGroupB1InUNSGroupB1_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_ZUNSGroupB1InUNSGroupB1 source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE TSB_ZUNSGroupB1InUNSGroupB1_C(2 @SlotNumberDummy int,3 @dummy1 varchar(38),4 @Dummy2 varchar(38),5 @GenProcIDDummy varchar(38)6)7AS8BEGIN9 BEGIN TRY10 UPDATE UNSGroupB1Collection11 SET IsCircular = 112 FROM UNSGroupB1Collection co13 WHERE14 co.UID_UNSGroupB1Child <> co.UID_UNSGroupB1Parent AND EXISTS(15 SELECT TOP 1 116 FROM UNSGroupB1Collection ce17 WHERE18 co.UID_UNSGroupB1Child = ce.UID_UNSGroupB1Parent AND co.UID_UNSGroupB1Parent = ce.UID_UNSGroupB1Child) AND IsCircular = 019 UPDATE UNSGroupB1Collection20 SET IsCircular = 021 FROM UNSGroupB1Collection co22 WHERE23 co.UID_UNSGroupB1Child <> co.UID_UNSGroupB1Parent AND NOT EXISTS(24 SELECT TOP 1 125 FROM UNSGroupB1Collection ce26 WHERE27 co.UID_UNSGroupB1Child = ce.UID_UNSGroupB1Parent AND co.UID_UNSGroupB1Parent = ce.UID_UNSGroupB1Child) AND IsCircular = 128 UPDATE UNSGroupB1Collection29 SET IsCircular = 130 FROM UNSGroupB1Collection co31 WHERE32 co.UID_UNSGroupB1Child = co.UID_UNSGroupB1Parent AND EXISTS(33 SELECT TOP 1 134 FROM UNSGroupB1Collection ce35 WHERE36 co.UID_UNSGroupB1Parent = ce.UID_UNSGroupB1Parent AND ce.UID_UNSGroupB1Child <> ce.UID_UNSGroupB1Parent AND IsCircular = 1) AND IsCircular37 = 038 UPDATE UNSGroupB1Collection39 SET IsCircular = 040 FROM UNSGroupB1Collection co41 WHERE42 co.UID_UNSGroupB1Child = co.UID_UNSGroupB1Parent AND NOT EXISTS(43 SELECT TOP 1 144 FROM UNSGroupB1Collection ce45 WHERE46 co.UID_UNSGroupB1Parent = ce.UID_UNSGroupB1Parent AND ce.UID_UNSGroupB1Child <> ce.UID_UNSGroupB1Parent AND IsCircular = 1) AND IsCircular47 = 148 UPDATE UNSGroupB1Collection49 SET IsCircular = x.IsCircular50 FROM UNSGroupB1Collection co51 JOIN(52 SELECT53 y.UID_UNSGroupB1Child,54 y.IsCircular55 FROM UNSGroupB1Collection y56 WHERE57 y.UID_UNSGroupB1Child = y.UID_UNSGroupB1Parent) AS x58 ON x.UID_UNSGroupB1Child = co.UID_UNSGroupB1Child59 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_ZUNSGroupB1InUNSGroupB1_C ( @SlotNumberDummy int , @dummy1 varchar(38) , @Dummy2 varchar(38) , @GenProcIDDummy2 varchar(38) ) as begin BEGIN TRY update UNSGroupB1Collection set IsCircular = 1 from UNSGroupB1Collection co where co.UID_UNSGroupB1Child <> co.UID_UNSGroupB1Parent3 and exists (select top 1 1 from UNSGroupB1Collection ce where co.UID_UNSGroupB1Child = ce.UID_UNSGroupB1Parent and co.UID_UNSGroupB1Parent = ce.UID_UNSGroupB1Child4 ) and IsCircular = 0 update UNSGroupB1Collection set IsCircular = 0 from UNSGroupB1Collection co where co.UID_UNSGroupB1Child <> co.UID_UNSGroupB1Parent5 and not exists (select top 1 1 from UNSGroupB1Collection ce where co.UID_UNSGroupB1Child = ce.UID_UNSGroupB1Parent and co.UID_UNSGroupB1Parent6 = ce.UID_UNSGroupB1Child ) and IsCircular = 1 update UNSGroupB1Collection set IsCircular = 1 from UNSGroupB1Collection co where co.UID_UNSGroupB1Child7 = co.UID_UNSGroupB1Parent and exists (select top 1 1 from UNSGroupB1Collection ce where co.UID_UNSGroupB1Parent = ce.UID_UNSGroupB1Parent and 8ce.UID_UNSGroupB1Child <> ce.UID_UNSGroupB1Parent and IsCircular = 1 ) and IsCircular = 0 update UNSGroupB1Collection set IsCircular = 0 from UNSGroupB1Collection9 co where co.UID_UNSGroupB1Child = co.UID_UNSGroupB1Parent and not exists (select top 1 1 from UNSGroupB1Collection ce where co.UID_UNSGroupB1Parent10 = ce.UID_UNSGroupB1Parent and ce.UID_UNSGroupB1Child <> ce.UID_UNSGroupB1Parent and IsCircular = 1 ) and IsCircular = 1 update UNSGroupB1Collection11 set IsCircular = x.IsCircular from UNSGroupB1Collection co join (select y.UID_UNSGroupB1Child, y.IsCircular from UNSGroupB1Collection y where y.UID_UNSGroupB1Child12 = y.UID_UNSGroupB1Parent ) as x on x.UID_UNSGroupB1Child = co.UID_UNSGroupB1Child where co.IsCircular <> x.IsCircular END TRY BEGIN CATCH exec 13QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 14