Back to OIM Explorer

dbo.QBM_FGIColumnNotExistsInSchema

Scalar FunctionSQL_SCALAR_FUNCTIONSandbox DB

Scalar Function.

Source: sandbox-db sys.sql_modules

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

SQL22 lines
1CREATE FUNCTION dbo.QBM_FGIColumnNotExistsInSchema(2  @TableName varchar(30),3  @ColumnPattern varchar(30)4) RETURNS BIT5AS6BEGIN7  DECLARE @ret BIT = 18  IF EXISTS(9    SELECT TOP 1 110    FROM sys.tables t11    WITH(readpast)12  JOIN sys.columns c13    WITH(readpast)14    ON t.object_id = c.object_id15  WHERE16    t.name = @TableName AND c.name LIKE @ColumnPattern)17  BEGIN18    SELECT @ret = 019  END20  endLabel:21  RETURN(@ret)22END
Open raw exported source
SQL ยท Raw4 lines
1    create   function dbo.QBM_FGIColumnNotExistsInSchema (@TableName varchar(30) , @ColumnPattern varchar(30) ) returns bit  as begin declare @ret2 bit = 1 if exists (select top 1 1 from sys.tables t with (readpast) join sys.columns c with (readpast) on t.object_id = c.object_id where t.name = @TableName3 and c.name like @ColumnPattern ) begin select @ret = 0 end endLabel: return(@ret) end 4