dbo.QBM_FGIJobQueueCountDeliver
Scalar FunctionSQL_SCALAR_FUNCTIONSandbox DB
Interpretation
- Database function. Usually supports views, validation, or calculated predicates; look at referenced-by entries for callers.
Relations
- No extracted relations.
Typed Edges
- No typed edges extracted for this source.
Complete Source
1CREATE FUNCTION dbo.QBM_FGIJobQueueCountDeliver(2 @CountPerMinute int,3 @Sekunden int,4 @CurrentReady int,5 @Priority int6) RETURNS int7 WITH SCHEMABINDING8AS9BEGIN10 DECLARE @CountItems int11 SELECT12 @CountItems =(((((@CountPerMinute*100) / 60) * @Sekunden) -(@CurrentReady * 100)) / 100) +113 IF @priority = -114 BEGIN15 IF @CountItems < 016 BEGIN17 SELECT @CountItems = 018 END19 END20 ELSE21 BEGIN22 IF @CountItems < 123 BEGIN24 SELECT @CountItems =(-1) *((((((@CountPerMinute*100) / 60) * @Sekunden)) / 100) +1)25 END26 END27 IF @CountItems > 50028 BEGIN29 SELECT @CountItems = 50030 END31 RETURN(@CountItems)32END
Open raw exported source
1 create function dbo.QBM_FGIJobQueueCountDeliver (@CountPerMinute int, @Sekunden int, @CurrentReady int, @Priority int) returns int with SCHEMABINDING2 as begin declare @CountItems int select @CountItems = (((((@CountPerMinute*100) / 60 ) * @Sekunden ) - (@CurrentReady * 100)) / 100 ) +1 if @priority3 = -1 begin if @CountItems < 0 begin select @CountItems = 0 end end else begin if @CountItems < 1 begin select @CountItems = (-1) * ((((((@CountPerMinute*1004) / 60 ) * @Sekunden ) ) / 100 )+1) end end if @CountItems > 500 begin select @CountItems = 500 end return (@CountItems) end 5