dbo.TSB_FGIUNSRootBMatching
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
- No direct source references extracted.
Complete Source
1CREATE FUNCTION dbo.TSB_FGIUNSRootBMatching(2 @UID_UNSRootB1 varchar(38),3 @UID_UNSRootB2 varchar(38)4) RETURNS int5 WITH schemabinding6AS7BEGIN8 DECLARE @erg int = 09 IF @UID_UNSRootB1 = @UID_UNSRootB210 BEGIN11 SELECT @erg = 112 RETURN(@erg)13 END14 IF EXISTS(15 SELECT TOP 1 116 FROM dbo.UNSRootB a17 JOIN dbo.DPRNameSpace n18 ON n.UID_DPRNameSpace = a.UID_DPRNameSpace19 JOIN dbo.UNSRootB b20 ON n.UID_DPRNameSpace = b.UID_DPRNameSpace21 WHERE22 n.IsExtendedInheritance = 1 AND a.UID_UNSRootB = @UID_UNSRootB1 AND b.UID_UNSRootB = @UID_UNSRootB2)23 BEGIN24 SELECT @erg = 125 END26 endLabel:27 RETURN(@erg)28END
Open raw exported source
1 create function dbo.TSB_FGIUNSRootBMatching ( @UID_UNSRootB1 varchar(38), @UID_UNSRootB2 varchar(38) ) returns int with schemabinding as begin2 declare @erg int = 0 if @UID_UNSRootB1 = @UID_UNSRootB2 begin select @erg = 1 return(@erg) end if exists (select top 1 1 from dbo.UNSRootB a join dbo.DPRNameSpace3 n on n.UID_DPRNameSpace = a.UID_DPRNameSpace join dbo.UNSRootB b on n.UID_DPRNameSpace = b.UID_DPRNameSpace where n.IsExtendedInheritance = 1 and a.UID_UNSRootB4 = @UID_UNSRootB1 and b.UID_UNSRootB = @UID_UNSRootB2 ) begin select @erg = 1 end endLabel: return(@erg) end 5