dbo.QBM_FSQColumnList
SQL_SCALAR_FUNCTION
Created 2025-06-27T17:57:01.413 · modified 2026-04-14T23:14:10.420 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| nvarchar | yes |
@TableName | varchar | no |
@WithReplaceCall | bit | no |
@SuppressAutomaticColumns | bit | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogDatabase | 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_FSQColumnList(@TableName varchar(30) , @WithReplaceCall bit , @SuppressAutomaticColumns bit ) returns nvarchar(max 2) as begin return ( select string_agg(z.EineZeile , nchar(13) + nchar(10) + nchar(9) + N', ' ) within group (order by z.Zeile) from ( select string_agg 3(convert(nvarchar(max), y.ColumnName ) , N', ' ) within group(order by y.column_id) as EineZeile , y.Zeile from( select x.Zeile, x.column_id , case when 4 @WithReplaceCall = 0 or x.DATA_TYPE not like '%char%' or isnull(x.SchemaDatalen, 0) < 38 then x.ColumnName else concat(case x.SchemaDatalen when 38 then 5 'dbo.QBM_FCVGuidToReplace38(' when 138 then 'dbo.QBM_FCVGuidToReplace138(' when 263 then 'dbo.QBM_FCVGuidToReplace138(' else 'dbo.QBM_FCVGuidToReplaceMax(' 6 end , x.ColumnName , ', ''' , ( select top 1 uid_database from DialogDatabase with (readpast) where IsMainDatabase = 1 ) , ''')' ) end as ColumnName from 7 ( select row_number() over (order by c.column_id) / 10 as Zeile ,c.column_id , c.name as Columnname , cc.DATA_TYPE , case cc.CHARACTER_MAXIMUM_LENGTH 8when -1 then 2000000 else cc.CHARACTER_MAXIMUM_LENGTH end as SchemaDatalen from sys.tables t with (readpast) join sys.columns c with (readpast) on t.object_id 9 = c.object_id join INFORMATION_SCHEMA.COLUMNS cc with (readpast) on cc.TABLE_NAME = t.name and cc.COLUMN_NAME = c.name where t.name = @TableName and ( 10 (@SuppressAutomaticColumns = 1 and cc.DATA_TYPE not in ('timestamp', 'rowversion' ) ) or @SuppressAutomaticColumns = 0 ) ) as x ) as y group by y.Zeile 11 ) as z ) end 12
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:14:10.420
None extracted.
Summary: reads/joins DialogDatabase, sys, INFORMATION_SCHEMA
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
| nvarchar | OUTPUT |
@TableName | varchar(30) | input |
@WithReplaceCall | bit | input |
@SuppressAutomaticColumns | bit | input |
DML targets
None extracted.Called routines
None extracted.
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @TableName @WithReplaceCall @SuppressAutomaticColumns
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_PTableReload | SQL expression dependency | dbo · OBJECT_OR_COLUMN |