dbo.QBM_FGIConstraintsDisabled
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.QBM_FGIConstraintsDisabled(2) RETURNS BIT3AS4BEGIN5 RETURN(CASE6 WHEN EXISTS(7 SELECT TOP 1 18 FROM sys.foreign_keys fk9 WITH(nolock)10 JOIN sys.objects c11 WITH(nolock)12 ON c.object_id = fk.parent_object_id13 JOIN sys.objects p14 WITH(nolock)15 ON p.object_id = fk.referenced_object_id16 WHERE17 fk.type = 'F' AND c.type IN('U') AND p.type IN('U') AND fk.is_disabled = 1) THEN18 119 ELSE 020 END)21END
Open raw exported source
1 create function dbo.QBM_FGIConstraintsDisabled() returns bit as begin return( case when exists (select top 1 1 from sys.foreign_keys fk with2 (nolock)join sys.objects c with (nolock)on c.object_id = fk.parent_object_id join sys.objects p with (nolock) on p.object_id = fk.referenced_object_id3 where fk.type = 'F' and c.type in( 'U' ) and p.type in( 'U' ) and fk.is_disabled = 1 ) then 1 else 0 end ) end 4