Back to OIM Explorer

dbo.QBM_FGIStageIsToUpdate

Scalar FunctionSQL_SCALAR_FUNCTIONSandbox DB

Scalar Function.

Source: sandbox-db sys.sql_modules

Source size: 533 characters

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.

References

  • No direct source references extracted.

Referenced By

  • No direct source references extracted.

Complete Source

SQL29 lines
1CREATE FUNCTION dbo.QBM_FGIStageIsToUpdate(2  @HotfixLine varchar(14)3) RETURNS BIT4AS5BEGIN6  DECLARE @erg BIT = 07  DECLARE @TargetVersion varchar(64) = CONCAT(@HotfixLine,8  '.9999')9  IF NOT EXISTS(10    SELECT TOP 1 111    FROM sys.objects t12    WITH(readpast)13  WHERE14    t.name = 'DialogDatabase' AND t.type = 'U')15  BEGIN16    GOTO endLabel17  END18  IF EXISTS(19    SELECT TOP 1 120    FROM QBMModuleDef d21    WITH(readpast)22  WHERE23    isnull(d.MigrationVersion, '') < @TargetVersion AND d.MigrationVersion > ' ')24  BEGIN25    SELECT @erg = 126  END27  endLabel:28  RETURN(@erg)29END
Open raw exported source
SQL ยท Raw5 lines
1   create   function dbo.QBM_FGIStageIsToUpdate (@HotfixLine varchar(14) ) returns bit as begin declare @erg bit = 0 declare @TargetVersion varchar2(64) = concat(@HotfixLine , '.9999') if not exists (select top 1 1 from sys.objects t with (readpast) where t.name = 'DialogDatabase' and t.type = 'U' 3) begin goto endLabel end if exists (select top 1 1 from QBMModuleDef d with (readpast) where isnull(d.MigrationVersion, '') < @TargetVersion  and d.MigrationVersion4 > ' ' ) begin select @erg = 1 end endLabel: return(@erg) end 5