dbo.QBM_FGISessionErrorForLog_i

SQL_SCALAR_FUNCTION

Created 2025-06-27T17:57:01.507 · modified 2026-04-14T23:14:10.487 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
nvarcharyes
@RowDelimiternvarcharno

Referenced objects

SchemaObjectColumn/minorClass
QBM_YSessionErrorTYPE
dboQBM_FTSessionErrorLoadOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1 create   function dbo.QBM_FGISessionErrorForLog_i( @RowDelimiter nvarchar(16) ) returns nvarchar(max) as begin declare @erg nvarchar(max) = N''
2 declare @Start nvarchar(max) = N'' declare @ExistingErrors QBM_YSessionError declare @ElementCount int declare @ElementIndex int declare @IsRethrow bit
3 insert into @ExistingErrors (ErrorMessage, ErrorSeverity, ErrorState, ErrorNumber , ProcedureName, ProcedureLine, MessageDate , GenProcID, RepeatCounter
4, IsReThrow, SourceCode) select ErrorMessage, ErrorSeverity, ErrorState, ErrorNumber , ProcedureName, ProcedureLine, MessageDate , GenProcID, RepeatCounter
5, IsReThrow, SourceCode from dbo.QBM_FTSessionErrorLoad() el order by el.RecordNumber desc select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while
6 @ElementIndex <= @ElementCount begin if @erg > N' ' begin select @erg = concat(@erg, @RowDelimiter) end select @erg = concat (@Start  , @erg  , TRIM(str
7(e.ErrorNumber)) , NCHAR(9) , TRIM(str( case e.ErrorState  when 1 then 0 when 2 then 1 when 3 then 2 else 0  end )) , NCHAR(9) ,  case e.IsReThrow when
8 0 then e.ErrorMessage when 1 then concat( N're-throw in ', e.ProcedureName, ' Line ', trim(str(ISNULL(e.ProcedureLine, 0))) ) end  )  , @IsRethrow = e.IsReThrow
9 from @ExistingErrors e where e.ElementIndex = @ElementIndex if @IsRethrow = 0  begin if @erg > N' ' begin select @erg = concat(@erg, @RowDelimiter) end
10 select @erg = concat (@Start  , @erg  , TRIM(str(e.ErrorNumber)) , NCHAR(9) , TRIM(str( case e.ErrorState  when 1 then 0 when 2 then 1 when 3 then 2 else
11 0  end )) , NCHAR(9)  , concat( 'detected in ' , ' (SRV=' , @@servername  , ', DB=' , left(DB_Name(), 64) , N') ' , 'procedure ' , e.ProcedureName, ' Line '
12, trim(str(ISNULL(e.ProcedureLine, 0))) ) , case when e.RepeatCounter > 0 then ' repeated ' + TRIM(str(e.RepeatCounter)) + ' times ' else '' end , case
13 when e.SourceCode > ' ' and e.SourceCode not like '<no code>%' then ' code starting with : ' + left(e.SourceCode, 6000) else '' end  )  from @ExistingErrors
14 e where e.ElementIndex = @ElementIndex end  select @ElementIndex += 1 end  endLabel: return(@erg) end 
15

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.487

None extracted.

Summary: writes INSERT into; reads/joins QBM_FTSessionErrorLoad

Declared parameters

ParameterTypeDirection
nvarcharOUTPUT
@RowDelimiternvarchar(16)input

DML targets

INSERT into

Called routines

None extracted.

Read/join references

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @RowDelimiter @erg @Start @ExistingErrors @ElementCount @ElementIndex @IsRethrow @ROWCOUNT @servername

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 objectRelationEvidence
dbo.QBM_FGISessionErrorForLogSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.QBM_FGISessionErrorForLog_7SQL expression dependencydbo · OBJECT_OR_COLUMN