dbo.QER_FGIBitPatternOwnershipInfo
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.
References
- No direct source references extracted.
Referenced By
Complete Source
1CREATE FUNCTION dbo.QER_FGIBitPatternOwnershipInfo(2 @PatternNames nvarchar(256),3 @AllExceptThis BIT4) RETURNS int5 WITH SCHEMABINDING6AS7BEGIN8 RETURN(9 SELECT CASE @AllExceptThis10 WHEN 0 THEN11 SUM(DISTINCT v.xvalue)12 ELSE ~ SUM(DISTINCT v.xvalue)13 END14 FROM(15 VALUES('Higher', 1),('Lower', 2),('Top', 4),('', 0)) AS v(xkey, xvalue)16 JOIN string_split(isnull(@PatternNames, ''), '|') AS s17 ON v.xkey = s.value)18END
Open raw exported source
1 create function dbo.QER_FGIBitPatternOwnershipInfo( @PatternNames nvarchar(256) , @AllExceptThis bit ) returns int with SCHEMABINDING as 2begin return( select case @AllExceptThis when 0 then SUM(distinct v.xvalue) else ~ SUM(distinct v.xvalue) end from ( values ('Higher', 1) , ('Lower', 23) , ('Top', 4) , ('', 0) ) as v (xkey, xvalue) join string_split(isnull(@PatternNames, ''), '|') as s on v.xkey = s.value ) end 4