dbo.QBM_FGIColumnDataType
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_FGIColumnDataType(2 @TableName varchar(30),3 @columnname varchar(30)4) RETURNS nvarchar(645)6AS7BEGIN8 DECLARE @erg nvarchar(64)9 IF @TableName IN(10 SELECT TableName11 FROM QBM_VStartupTables)12 BEGIN13 SELECT TOP 1 @erg = DATA_TYPE14 FROM INFORMATION_SCHEMA.COLUMNS cc15 WHERE16 cc.COLUMN_NAME = @columnname AND cc.TABLE_NAME = @TableName17 END18 ELSE19 BEGIN20 SELECT TOP 1 @erg = cc.SchemaDataType21 FROM DialogColumn cc22 WITH(readpast)23 JOIN DialogTable t24 WITH(readpast)25 ON cc.UID_DialogTable = t.UID_DialogTable26 WHERE27 cc.ColumnName = @columnname AND t.TableName = @TableName28 END29 ende:30 RETURN(@erg)31END
Open raw exported source
1 create function dbo.QBM_FGIColumnDataType(@TableName varchar(30) , @columnname varchar(30) ) returns nvarchar(64) as begin declare @erg nvarchar2(64) if @TableName in (select TableName from QBM_VStartupTables) begin select top 1 @erg = DATA_TYPE from INFORMATION_SCHEMA.COLUMNS cc where cc.COLUMN_NAME3 = @columnname and cc.TABLE_NAME = @TableName end else begin select top 1 @erg = cc.SchemaDataType from DialogColumn cc with (readpast) join DialogTable4 t with (readpast) on cc.UID_DialogTable = t.UID_DialogTable where cc.ColumnName = @columnname and t.TableName = @TableName end ende: return(@erg) end 5