dbo.QER_FGIBitPatternInheritInfo
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
- dbo.QER_FGIPwoValidDateRangesExist
- dbo.ADS_ZBaseTreeHasObject
- dbo.ADS_ZPersonHasObject
- dbo.CPL_PComplianceCheckMakeProc_h
- dbo.LDP_ZBaseTreeHasObject
- dbo.LDP_ZPersonHasObject
- dbo.QER_PITShopProductNodeCreate_b
- dbo.QER_PITShopProductNodeMove
- dbo.QER_ZBaseTreeHasObjectExtAtt
- dbo.QER_ZPersonHasObject
- dbo.QER_ZPersonHasObjectExtAtt
- dbo.RMS_ZBaseTreeHasObject
- dbo.RMS_ZPersonHasObject
- dbo.RPS_ZPersonHasObject
- dbo.TSB_ZBaseTreeHasObject
- dbo.TSB_ZPersonHasObject
- dbo.QER_FTPwoValidDateRanges
Complete Source
1CREATE FUNCTION dbo.QER_FGIBitPatternInheritInfo(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('Direct', 1),('Inherit', 2),('Master', 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_FGIBitPatternInheritInfo( @PatternNames nvarchar(256) , @AllExceptThis bit ) returns int with SCHEMABINDING as begin2 return ( select case @AllExceptThis when 0 then SUM(distinct v.xvalue) else ~ SUM(distinct v.xvalue) end from ( values ('Direct', 1 ) , ('Inherit'3, 2 ) , ('Master', 4) , ('', 0) ) as v (xkey, xvalue) join string_split(isnull(@PatternNames, ''), '|') as s on v.xkey = s.value ) end 4