dbo.QBM_PSplittedElementProcess

SQL_STORED_PROCEDURE

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

Open formatted source/search result

Parameters

NameTypeOutput
@SourcesQBM_YParameterListno
@SplittedElementTypevarcharno

Referenced objects

SchemaObjectColumn/minorClass
QBM_YParameterListTYPE
QBM_YSplittedElementHelperTYPE
QBMSplittedLookupOBJECT_OR_COLUMN
dboQBM_FCVStringToGUIDOBJECT_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   procedure QBM_PSplittedElementProcess (@Sources QBM_YParameterList readonly , @SplittedElementType varchar(16) ) as begin declare
2 @IstInsert int = 0 declare @IstDelete int = 0 declare @IstUpdate int = 0 declare @DebugSwitch int = 0 declare @soll QBM_YSplittedElementHelper declare
3 @ist QBM_YSplittedElementHelper if @DebugSwitch > 0 begin print 'gelieferte @Sources für ElementType ' + @SplittedElementType select * from @Sources  
4   end if not exists (select top 1 1 from @Sources ) begin if @DebugSwitch > 0 begin print 'nix geliefert, return' end return end insert into @soll(UID_QBMSplittedLookup
5, UID_DialogColumn, ObjectKeyOwner, SplittedElement, UID_Person) select     dbo.QBM_FCVStringToGUID('', concat(x.UID_DialogColumn , x.ObjectKeyOwner , 
6x.SplittedElement ))    , x.UID_DialogColumn, x.ObjectKeyOwner, isnull(x.SplittedElement, ''), x.UID_Person from ( select s.Parameter2 as UID_DialogColumn
7 , s.Parameter3 as ObjectKeyOwner, s.ContentShort as SplittedElement , s.Parameter1 as UID_Person from @Sources s where s.HasContentFull = 0  union  select
8 s.Parameter2 as UID_DialogColumn, s.Parameter3 as ObjectKeyOwner, p.SplittedElement as SplittedElement, s.Parameter1 as UID_Person from @Sources s outer
9 apply (select case @SplittedElementType when 'Email' then replace(y.SplittedElement, 'smtp:', '') else y.SplittedElement end as SplittedElement from (
10 select trim(x.value) as SplittedElement from string_split (s.ContentFull, nchar(7)) x      ) as y ) as p where s.HasContentFull = 1  ) as x if @DebugSwitch
11 > 0 begin print 'Erstbefüllung soll' select * from @soll end insert into @ist(UID_QBMSplittedLookup, UID_DialogColumn, ObjectKeyOwner, SplittedElement
12, UID_Person ) select distinct t.UID_QBMSplittedLookup, t.UID_DialogColumn, t.ObjectKeyOwner, '', t.UID_Person  from QBMSplittedLookup t join @soll s on
13 t.ObjectKeyOwner = s.ObjectKeyOwner and t.UID_DialogColumn = s.UID_DialogColumn if @DebugSwitch > 0 begin print 'Erstbefüllung ist' select * from @ist
14 end update @soll set IsToInsert = 1 from @soll s left outer join @ist i on s.UID_QBMSplittedLookup = i.UID_QBMSplittedLookup where i.UID_QBMSplittedLookup
15 is null select @IstInsert = @@ROWCOUNT if @DebugSwitch > 0 begin print 'Soll nach Bewertung Neuaufnahme' select * from @soll end delete  @soll from @soll
16 s where s.SplittedElement = ''  if @DebugSwitch > 0 begin print 'Soll nach Löschung leere' select * from @soll end update @ist set isToDelete = 1 from
17 @ist i left outer join @soll s on i.UID_QBMSplittedLookup = s.UID_QBMSplittedLookup where s.UID_QBMSplittedLookup is null select @IstDelete = @@ROWCOUNT
18 update @soll set IsToUpdate = 1 from @ist i join @soll s on i.UID_QBMSplittedLookup = s.UID_QBMSplittedLookup where isnull(i.UID_Person, '') <> isnull
19(s.UID_Person, '') select @IstUpdate = @@ROWCOUNT if @DebugSwitch > 0 begin print 'Nach Bewertung soll' select * from @soll print 'Nach Bewertung ist' 
20select * from @ist end if @IstDelete > 0 begin delete QBMSplittedLookup from QBMSplittedLookup d join @ist s on d.UID_QBMSplittedLookup = s.UID_QBMSplittedLookup
21 where s.isToDelete = 1 end if @IstInsert > 0 begin insert into QBMSplittedLookup( UID_QBMSplittedLookup , UID_DialogColumn , ObjectKeyOwner , SplittedElement
22 , UID_Person , SplittedElementType  ) select s.UID_QBMSplittedLookup , s.UID_DialogColumn , s.ObjectKeyOwner , s.SplittedElement , s.UID_Person , @SplittedElementType
23  from @soll s where s.IsToInsert = 1 end if @IstUpdate > 0 begin update QBMSplittedLookup set UID_Person = s.UID_Person from QBMSplittedLookup i join 
24@soll s on i.UID_QBMSplittedLookup = s.UID_QBMSplittedLookup where s.IsToUpdate = 1 end endLabel: return end 
25

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

None extracted.

Summary: writes INSERT into, INSERT QBMSplittedLookup, UPDATE QBMSplittedLookup, DELETE QBMSplittedLookup; reads/joins string_split, QBMSplittedLookup

Declared parameters

ParameterTypeDirection
@Sourcesqbm_yparameterlistinput
@SplittedElementTypevarchar(16)input

DML targets

INSERT into INSERT QBMSplittedLookup UPDATE QBMSplittedLookup DELETE QBMSplittedLookup

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: @Sources @SplittedElementType @IstInsert @IstDelete @IstUpdate @DebugSwitch @soll @ist @ROWCOUNT

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.GEN_T434B5E2D8CE810D03D3E60FDFSQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T44448A88C79EB072D6BF86BCFSQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T455B9E89343CAF31DA0DD5DE7SQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T4AAF468A50FBC66DA7F09A8FBSQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T4E0DB2DF6F93D6899D14FA23ESQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T4EA5BEF878506C2ECF7CC872DSQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T4FF351239201D9321B31572D8SQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T510C4332D79E8164AE96F3396SQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T54915278D99F3E058B84E9EB8SQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T5547F96F60AEF00FEBBF127C6SQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T566D1549832918A49F16A421BSQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T5C1779AB54E0F71C5A75DB3F0SQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T5DDC3978183ACC3A5025878D1SQL expression dependencyOBJECT_OR_COLUMN
dbo.GEN_T5FD175F854D38DD360AB37FA6SQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_FSQTriggerSplittedLookupsource text referenceSQL_SCALAR_FUNCTION