Back to OIM Explorer

dbo.QBM_FGIJobCreatedExists

Scalar FunctionSQL_SCALAR_FUNCTIONSandbox DB

Scalar Function.

Source: sandbox-db sys.sql_modules

Source size: 472 characters

Interpretation

  • Database function. Usually supports views, validation, or calculated predicates; look at referenced-by entries for callers.

Relations

  • No extracted relations.

Typed Edges

  • references source dbo.QBM_FGIJobCreateName source text reference

Complete Source

SQL20 lines
1CREATE FUNCTION dbo.QBM_FGIJobCreatedExists(2  @ObjectKeyToSearch varchar(138)3) RETURNS BIT4AS5BEGIN6  DECLARE @erg BIT = 07  IF EXISTS(8    SELECT TOP 1 19    FROM JobQueue jq10    WITH(nolock)11  JOIN QBMElementAffectedByJob ea12    ON jq.UID_Job = ea.UID_Job AND ea.ObjectKeyAffected = @ObjectKeyToSearch13  WHERE14    jq.JobChainName LIKE dbo.QBM_FGIJobCreateName(NULL) + '%' AND jq.IsRootJob = 1 AND jq.Ready2EXE LIKE N '[^DH][^I]%')15  BEGIN16    SELECT @erg = 117  END18  endLabel:19  RETURN(@erg)20END
Open raw exported source
SQL ยท Raw5 lines
1 create   function dbo.QBM_FGIJobCreatedExists(@ObjectKeyToSearch varchar(138)) returns bit as begin declare @erg bit = 0  if exists (select top2 1 1 from JobQueue jq with (nolock) join QBMElementAffectedByJob ea on jq.UID_Job = ea.UID_Job and ea.ObjectKeyAffected = @ObjectKeyToSearch where jq.JobChainName3 like dbo.QBM_FGIJobCreateName(null) + '%' and jq.IsRootJob = 1 and jq.Ready2EXE like N'[^DH][^I]%'    ) begin select @erg = 1 end endLabel: return(@erg4) end 5