dbo.TSB_ZTSBAccountDefFlags
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_FGISessionContext source text reference
- references source dbo.QBM_PSessionContextSet source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE TSB_ZTSBAccountDefFlags(2 @SlotNumber int,3 @uid_TSBAccountDef varchar(38),4 @SubObject varchar(38),5 @GenProcID varchar(38)6)7AS8BEGIN9 DECLARE @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('')10 DECLARE @XUser nvarchar(64) = object_name(@@procid)11 DECLARE @Xdate datetime = getutcdate()12 BEGIN TRY13 EXEC QBM_PSessionContextSet 'GenProcID',14 @GenProcID15 EXEC QBM_PSessionContextSet 'GenProcID',16 @GenProcID17 UPDATE TSBAccountDef18 SET PFDInheritAccountDef = cast(sign(cast(isnull(TSBAccountDef.PFDInheritAccountDef, 0) AS int) & cast(isnull(v.PFDInheritAccountDef,19 0) AS int)) AS BIT),20 XDateUpdated = @Xdate,21 XUserUpdated = @XUser22 FROM TSBAccountDef,23 TSBAccountDef v24 WHERE25 TSBAccountDef.UID_TSBAccountDefPredecessor = v.uid_TSBAccountDef AND TSBAccountDef.uid_TSBAccountDef = @uid_TSBAccountDef AND cast(sign26 (cast(isnull(TSBAccountDef.PFDInheritAccountDef, 0) AS int) & cast(isnull(v.PFDInheritAccountDef, 0) AS int)) AS BIT) <> isnull(TSBAccountDef.PFDInheritAccountDef27 ,28 0)29 EXEC QBM_PSessionContextSet 'GenProcID',30 @GenProcID31 UPDATE TSBAccountDef32 SET PMDInheritAccountDef = cast(sign(cast(isnull(TSBAccountDef.PMDInheritAccountDef, 0) AS int) & cast(isnull(v.PMDInheritAccountDef,33 0) AS int)) AS BIT),34 XDateUpdated = @Xdate,35 XUserUpdated = @XUser36 FROM TSBAccountDef,37 TSBAccountDef v38 WHERE39 TSBAccountDef.UID_TSBAccountDefPredecessor = v.uid_TSBAccountDef AND TSBAccountDef.uid_TSBAccountDef = @uid_TSBAccountDef AND cast(sign40 (cast(isnull(TSBAccountDef.PMDInheritAccountDef, 0) AS int) & cast(isnull(v.PMDInheritAccountDef, 0) AS int)) AS BIT) <> isnull(TSBAccountDef.PMDInheritAccountDef41 ,42 0)43 EXEC QBM_PSessionContextSet 'GenProcID',44 @GenProcID45 UPDATE TSBAccountDef46 SET PTDInheritAccountDef = cast(sign(cast(isnull(TSBAccountDef.PTDInheritAccountDef, 0) AS int) & cast(isnull(v.PTDInheritAccountDef,47 0) AS int)) AS BIT),48 XDateUpdated = @Xdate,49 XUserUpdated = @XUser50 FROM TSBAccountDef,51 TSBAccountDef v52 WHERE53 TSBAccountDef.UID_TSBAccountDefPredecessor = v.uid_TSBAccountDef AND TSBAccountDef.uid_TSBAccountDef = @uid_TSBAccountDef AND cast(sign54 (cast(isnull(TSBAccountDef.PTDInheritAccountDef, 0) AS int) & cast(isnull(v.PTDInheritAccountDef, 0) AS int)) AS BIT) <> isnull(TSBAccountDef.PTDInheritAccountDef55 ,56 0)57 EXEC QBM_PSessionContextSet 'GenProcID',58 @GenProcID59 UPDATE TSBAccountDef60 SET PSIInheritAccountDef = cast(sign(cast(isnull(TSBAccountDef.PSIInheritAccountDef, 0) AS int) & cast(isnull(v.PSIInheritAccountDef,61 0) AS int)) AS BIT),62 XDateUpdated = @Xdate,63 XUserUpdated = @XUser64 FROM TSBAccountDef,65 TSBAccountDef v66 WHERE67 TSBAccountDef.UID_TSBAccountDefPredecessor = v.uid_TSBAccountDef AND TSBAccountDef.uid_TSBAccountDef = @uid_TSBAccountDef AND cast(sign68 (cast(isnull(TSBAccountDef.PSIInheritAccountDef, 0) AS int) & cast(isnull(v.PSIInheritAccountDef, 0) AS int)) AS BIT) <> isnull(TSBAccountDef.PTDInheritAccountDef69 ,70 0)71 END TRY72 BEGIN CATCH73 EXEC QBM_PSessionErrorAdd DEFAULT74 RAISERROR('',75 18,76 1)77 WITH NOWAIT78 END CATCH79 ende:80 EXEC QBM_PSessionContextSet 'GenProcID',81 @GenProcID_R82 RETURN83END
Open raw exported source
1 create procedure TSB_ZTSBAccountDefFlags (@SlotNumber int , @uid_TSBAccountDef varchar(38) , @SubObject varchar(38) , @GenProcID varchar2(38) ) AS begin declare @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('') declare @XUser nvarchar(64) = object_name(@@procid) declare @Xdate 3datetime = getutcdate() BEGIN TRY exec QBM_PSessionContextSet 'GenProcID', @GenProcID exec QBM_PSessionContextSet 'GenProcID', @GenProcID update TSBAccountDef4 set PFDInheritAccountDef = cast(sign(cast(isnull(TSBAccountDef.PFDInheritAccountDef,0) as int) & cast(isnull(v.PFDInheritAccountDef,0) as int)) as bit5) , XDateUpdated = @Xdate , XUserUpdated = @XUser from TSBAccountDef , TSBAccountDef v where TSBAccountDef.UID_TSBAccountDefPredecessor = v.uid_TSBAccountDef6 and TSBAccountDef.uid_TSBAccountDef = @uid_TSBAccountDef and cast(sign(cast(isnull(TSBAccountDef.PFDInheritAccountDef,0) as int) & cast(isnull(v.PFDInheritAccountDef7,0) as int)) as bit) <> isnull(TSBAccountDef.PFDInheritAccountDef,0) exec QBM_PSessionContextSet 'GenProcID', @GenProcID update TSBAccountDef set PMDInheritAccountDef8 = cast(sign(cast(isnull(TSBAccountDef.PMDInheritAccountDef,0) as int) & cast(isnull(v.PMDInheritAccountDef,0) as int)) as bit) , XDateUpdated = @Xdate9 , XUserUpdated = @XUser from TSBAccountDef , TSBAccountDef v where TSBAccountDef.UID_TSBAccountDefPredecessor = v.uid_TSBAccountDef and TSBAccountDef.uid_TSBAccountDef10 = @uid_TSBAccountDef and cast(sign(cast(isnull(TSBAccountDef.PMDInheritAccountDef,0) as int) & cast(isnull(v.PMDInheritAccountDef,0) as int)) as bit) 11<> isnull(TSBAccountDef.PMDInheritAccountDef,0) exec QBM_PSessionContextSet 'GenProcID', @GenProcID update TSBAccountDef set PTDInheritAccountDef = cast12(sign(cast(isnull(TSBAccountDef.PTDInheritAccountDef,0) as int) & cast(isnull(v.PTDInheritAccountDef,0) as int)) as bit) , XDateUpdated = @Xdate , XUserUpdated13 = @XUser from TSBAccountDef , TSBAccountDef v where TSBAccountDef.UID_TSBAccountDefPredecessor = v.uid_TSBAccountDef and TSBAccountDef.uid_TSBAccountDef14 = @uid_TSBAccountDef and cast(sign(cast(isnull(TSBAccountDef.PTDInheritAccountDef,0) as int) & cast(isnull(v.PTDInheritAccountDef,0) as int)) as bit) 15<> isnull(TSBAccountDef.PTDInheritAccountDef,0) exec QBM_PSessionContextSet 'GenProcID', @GenProcID update TSBAccountDef set PSIInheritAccountDef = cast16(sign(cast(isnull(TSBAccountDef.PSIInheritAccountDef,0) as int) & cast(isnull(v.PSIInheritAccountDef,0) as int)) as bit) , XDateUpdated = @Xdate , XUserUpdated17 = @XUser from TSBAccountDef , TSBAccountDef v where TSBAccountDef.UID_TSBAccountDefPredecessor = v.uid_TSBAccountDef and TSBAccountDef.uid_TSBAccountDef18 = @uid_TSBAccountDef and cast(sign(cast(isnull(TSBAccountDef.PSIInheritAccountDef,0) as int) & cast(isnull(v.PSIInheritAccountDef,0) as int)) as bit) 19<> isnull(TSBAccountDef.PTDInheritAccountDef,0) END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende:20 exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R return end 21