dbo.QER_ZITShopMemberDelete
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.QER_PITShopOrderMove source text reference
- references source dbo.QER_PITShopOrderMove_bulk source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QER_ZITShopMemberDelete(2 @SlotNumber int3)4AS5BEGIN6 DECLARE @DebugLevel char(1) = 'W'7 DECLARE @PWOsToMove QBM_YParameterList8 BEGIN TRY9 INSERT INTO @PWOsToMove(Parameter1,10 Parameter2,11 Parameter3,12 HasContentFull)13 SELECT14 pwo.UID_PersonWantsOrg,15 NULL,16 x.GenProcID,17 118 FROM(19 SELECT20 UID_Parameter AS uid_person,21 UID_SubParameter AS uid_OrgSH,22 GenProcID23 FROM QBMDBQueueCurrent p24 WITH(readpast)25 WHERE26 p.SlotNumber = @SlotNumber) AS x27 JOIN PersonWantsOrg pwo28 ON x.uid_person = pwo.UID_PersonOrdered AND x.uid_OrgSH = pwo.UID_OrgParentOfParent29 WHERE30 NOT EXISTS(31 SELECT TOP 1 132 FROM BaseTree cu33 JOIN personinBaseTree pio34 ON cu.uid_parentorg = x.uid_OrgSH AND cu.itshopInfo = 'CU' AND pio.uid_org = cu.uid_org AND pio.uid_person = x.uid_person AND pio.XOrigin > 035 )36 EXEC QER_PITShopOrderMove_bulk @PWOsToMove37 END TRY38 BEGIN CATCH39 EXEC QBM_PSessionErrorAdd DEFAULT40 RAISERROR('',41 18,42 1)43 WITH NOWAIT44 END CATCH45END
Open raw exported source
1 create procedure QER_ZITShopMemberDelete (@SlotNumber int) as begin declare @DebugLevel char(1) = 'W' declare @PWOsToMove QBM_YParameterList2 BEGIN TRY insert into @PWOsToMove (Parameter1, Parameter2, Parameter3, HasContentFull) select pwo.UID_PersonWantsOrg, null , x.GenProcID, 1 from (3 select UID_Parameter as uid_person, UID_SubParameter as uid_OrgSH, GenProcID from QBMDBQueueCurrent p with (readpast) where p.SlotNumber = @SlotNumber4 ) as x join PersonWantsOrg pwo on x.uid_person = pwo.UID_PersonOrdered and x.uid_OrgSH = pwo.UID_OrgParentOfParent where not exists (select top 1 1 from5 BaseTree cu join personinBaseTree pio on cu.uid_parentorg = x.uid_OrgSH and cu.itshopInfo = 'CU' and pio.uid_org = cu.uid_org and pio.uid_person = x.uid_person6 and pio.XOrigin > 0 ) exec QER_PITShopOrderMove_bulk @PWOsToMove END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT7 END CATCH end 8