Back to OIM Explorer

dbo.QBM_FGITableName

Scalar FunctionSQL_SCALAR_FUNCTIONSandbox DB

Scalar Function.

Source: sandbox-db sys.sql_modules

Source size: 474 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

Complete Source

SQL30 lines
1CREATE FUNCTION dbo.QBM_FGITableName(2  @UID_DialogTable varchar(38)3) RETURNS varchar(304)5AS6BEGIN7  DECLARE @erg varchar(30) = NULL8  SELECT TOP 1 @erg = t.TableName9  FROM DialogTable t10    WITH(readpast)11  WHERE12    t.UID_DialogTable = @UID_DialogTable13  IF @erg IS NULL14  BEGIN15    SELECT16      @erg = SUBSTRING(@UID_DialogTable,17      7,18      30)19    IF NOT EXISTS(20      SELECT TOP 1 121      FROM sys.objects o22      WHERE23        o.type IN('U', 'V') AND o.name = @erg)24    BEGIN25      SELECT @erg = ''26    END27  END28  ende:29  RETURN(@erg)30END
Open raw exported source
SQL ยท Raw5 lines
1   create   function dbo.QBM_FGITableName(@UID_DialogTable varchar(38) ) returns varchar(30) as begin  declare @erg varchar(30) = null select top2 1 @erg = t.TableName from DialogTable t with (readpast) where t.UID_DialogTable = @UID_DialogTable if @erg is null begin select @erg = SUBSTRING(@UID_DialogTable3, 7, 30) if not exists (select top 1 1 from sys.objects o where o.type in ('U', 'V') and o.name = @erg ) begin select @erg = '' end end ende: return(@erg4) end 5