dbo.QBM_PGITableCountAndLastChange
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_FGITableCountAll source text reference
- references source dbo.QBM_PExecuteSQLWithRetry_LLP source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QBM_PGITableCountAndLastChange(2 @TableName varchar(30)3)4AS5BEGIN6 DECLARE @SQLCmd nvarchar(max)7 SELECT8 @SQLcmd = CONCAT(N ' select case x.CountRows9 when -1 then 110 else x.CountRows11 end as CountRows12 , x.MaxXDate13 from (14 select dbo.QBM_FGITableCountAll('''15 ,16 @TableName,17 ''') as CountRows, max(XDateUpdated) as MaxXDate18 from ',19 @TableName,20 ' with (readpast)21 ) as x22')23 EXEC QBM_PExecuteSQLWithRetry_LLP @SQLStatement = @SQLCmd,24 @LockTimeout_ms = DEFAULT,25 @MaxWaitTimeForLock_s = DEFAULT,26 @ProcIDForJournal = DEFAULT,27 @HandleErrorSilent = 0 endLabel:28END
Open raw exported source
1 create procedure QBM_PGITableCountAndLastChange (@TableName varchar(30)) as begin declare @SQLCmd nvarchar(max) select @SQLcmd = concat(N' select case x.CountRows2 when -1 then 13 else x.CountRows4 end as CountRows5 , x.MaxXDate6 from (7 select dbo.QBM_FGITableCountAll('''8, @TableName, ''') as CountRows, max(XDateUpdated) as MaxXDate9 from ',@TableName , ' with (readpast)10 ) as x11' ) exec QBM_PExecuteSQLWithRetry_LLP12 @SQLStatement = @SQLCmd , @LockTimeout_ms = default , @MaxWaitTimeForLock_s = default , @ProcIDForJournal = default , @HandleErrorSilent = 0 endLabel:13 end 14