dbo.QBM_FSQCVBufferToColumn
SQL_SCALAR_FUNCTION
Created 2025-06-27T17:57:30.060 · modified 2026-04-14T23:20:26.860 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| nvarchar | yes |
@TableName | varchar | no |
@columnname | varchar | no |
@BufferTableName | varchar | no |
@IsNullOption | bit | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| dbo | QBM_FGIColumnDataLen | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIColumnDataType | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create function dbo.QBM_FSQCVBufferToColumn (@TableName varchar(30) , @columnname varchar(30) , @BufferTableName varchar(64) , @IsNullOption 2 bit ) returns nvarchar(max) as begin declare @erg nvarchar(max) declare @datatype nvarchar(64) declare @DataMaxLen int select @datatype = dbo.QBM_FGIColumnDataType 3(@TableName , @columnname) select @DataMaxLen = dbo.QBM_FGIColumnDataLen(@TableName , @columnname) if @datatype = 'int' begin select @erg = concat('dbo.QBM_FCVStringToInt(' 4 , @BufferTableName , '.ContentShort, 0)') goto ende end if @datatype = 'bigint' begin select @erg = concat('dbo.QBM_FCVStringToBigInt(' , @BufferTableName 5 , '.ContentShort, 0)') goto ende end if @datatype = 'datetime' begin if @IsNullOption = 0 begin select @erg = concat('dbo.QBM_FCVStringToDatetime_BU(' 6 , @BufferTableName , '.ContentShort)') end else begin select @erg = concat(' isnull(' , 'dbo.QBM_FCVStringToDatetime_BU(' , @BufferTableName , '.ContentShort)' 7 , ', ''1800-01-01'' ) ' ) end goto ende end if @datatype = 'Float' begin select @erg = concat('dbo.QBM_FCVStringToFloat(' , @BufferTableName , '.ContentShort, 0.0)' 8) goto ende end if @datatype = 'Bit' begin select @erg = concat('dbo.QBM_FCVStringToBit(' , @BufferTableName , '.ContentShort)') goto ende end if @datatype 9 = 'varbinary' begin if @DataMaxLen <= 198 begin if @IsNullOption = 0 begin select @erg = concat('dbo.QBM_FCVStringToBinary(' , @BufferTableName , '.ContentShort)' 10) end else begin select @erg = concat('isnull(dbo.QBM_FCVStringToBinary(' , @BufferTableName , '.ContentShort), 0x0)') end end else begin if @IsNullOption 11 = 0 begin select @erg = concat(' 12case 13 when ' , @BufferTableName , '.HasContentFull = 1 then dbo.QBM_FCVStringToBinary(' , @BufferTableName , '.ContentFull) 14 else dbo.QBM_FCVStringToBinary(' 15 , @BufferTableName , '.ContentShort) 16end' ) end else begin select @erg = concat(' 17case 18 when ' , @BufferTableName , '.HasContentFull = 1 then dbo.QBM_FCVStringToBinary(' 19 , @BufferTableName , '.ContentFull) 20 else isnull(dbo.QBM_FCVStringToBinary(' , @BufferTableName , '.ContentShort), 0x0) 21end' ) end end goto ende end 22 if @datatype in( 'char' , 'nchar', 'varchar', 'nvarchar') begin if @DataMaxLen <= 400 begin if @isNullOption = 0 begin select @erg = concat('' , @BufferTableName 23 , '.ContentShort') end else begin if @datatype in( 'nvarchar' , 'nchar') begin select @erg = concat('isnull(' , @BufferTableName , '.ContentShort, N'''')' 24) end else begin select @erg = concat('isnull(' , @BufferTableName , '.ContentShort, '''')') end end end else begin if @isNullOption = 0 begin select 25@erg = concat(' 26case 27 when ' , @BufferTableName , '.HasContentFull = 1 then ' , @BufferTableName , '.ContentFull 28 else ' , @BufferTableName , '.ContentShort 29end' 30 ) end else begin if @datatype in( 'nvarchar' , 'nchar') begin select @erg = concat(' 31case 32 when ' , @BufferTableName , '.HasContentFull = 1 then isnull(' 33 , @BufferTableName , '.ContentFull, N'''') 34 else isnull(' , @BufferTableName , '.ContentShort, N'''') 35end' ) end else begin select @erg = concat(' 36case 37 when ' 38 , @BufferTableName , '.HasContentFull = 1 then isnull(' , @BufferTableName , '.ContentFull, '''') 39 else isnull(' , @BufferTableName , '.ContentShort, '''') 40end' 41 ) end end end goto ende end select @erg = ' message this_must_be_an_invalid_datatype' ende: return(@erg) end 42
Module relation graph
Loading module relation graph…
Source-derived context
Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.
provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:20:26.860
None extracted.
Summary: No calls/DML/dependency patterns extracted by the current parser.
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
| nvarchar | OUTPUT |
@TableName | varchar(30) | input |
@columnname | varchar(30) | input |
@BufferTableName | varchar(64) | input |
@IsNullOption | bit | input |
DML targets
None extracted.Called routines
None extracted.
Read/join references
None extracted.
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @TableName @columnname @BufferTableName @IsNullOption @erg @datatype @DataMaxLen @isNullOption
Referenced by / reverse dependencies
Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.
| Referencing object | Relation | Evidence |
|---|---|---|
| dbo.QBM_FSQBufferConfigSaveOrigin | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QBM_PBufferC_ProcessOneColumn | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QBM_PBufferC_RestoreOneColumn | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QBM_PBufferT_ProcessInsert | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QBM_PBufferT_ProcessUpdate | SQL expression dependency | dbo · OBJECT_OR_COLUMN |