Back to OIM Explorer

dbo.QBM_FGIDiskStoreExisting

Scalar FunctionSQL_SCALAR_FUNCTIONSandbox DB

Scalar Function.

Source: sandbox-db sys.sql_modules

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

Complete Source

SQL26 lines
1CREATE FUNCTION dbo.QBM_FGIDiskStoreExisting(2  @TableName varchar(30)3) RETURNS nvarchar(2564)5AS6BEGIN7  DECLARE @erg nvarchar(256)8  SELECT TOP 1 @erg = g.name9  FROM sys.partitions p10  JOIN sys.objects o11    ON p.object_id = o.object_id12  JOIN sys.allocation_units a13    ON a.container_id = p.partition_id14  JOIN sys.filegroups g15    ON g.data_space_id = a.data_space_id16  JOIN sys.database_files f17    ON f.data_space_id = g.data_space_id18  JOIN sys.tables t19    ON o.object_id = t.object_id20  JOIN DialogTable tt21    ON t.name = tt.TableName collate database_default22  WHERE23    o.name = @TableName AND tt.TableType IN('B',24  'T') endLabel:25  RETURN(@erg)26END
Open raw exported source
SQL ยท Raw6 lines
1   create   function dbo.QBM_FGIDiskStoreExisting (@TableName varchar(30) ) returns nvarchar(256) as begin declare @erg nvarchar(256) select top2 1 @erg = g.name from sys.partitions p join sys.objects o on p.object_id = o.object_id join sys.allocation_units a on a.container_id = p.partition_id join3 sys.filegroups g on g.data_space_id = a.data_space_id join sys.database_files f on f.data_space_id = g.data_space_id  join sys.tables t on o.object_id4 = t.object_id join DialogTable tt on t.name = tt.TableName collate database_default where o.name = @TableName and tt.TableType in ('B', 'T') endLabel:5 return(@erg) end 6