dbo.DPR_FSQTriggerRIMemberShip
SQL_SCALAR_FUNCTION
Created 2025-06-27T18:01:03.137 · modified 2026-04-14T23:20:35.593 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| nvarchar | yes |
@ParentTable | varchar | no |
@Operation | varchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogColumn | OBJECT_OR_COLUMN | ||
| DialogTable | OBJECT_OR_COLUMN | ||
| DialogValidDynamicRef | OBJECT_OR_COLUMN | ||
| DPRNameSpaceHasDialogTable | OBJECT_OR_COLUMN | ||
| QBM_VQBMRelation | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVStringToIndent | OBJECT_OR_COLUMN | |
| dbo | QBM_FGITableName | 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.DPR_FSQTriggerRIMemberShip(@ParentTable varchar(30) , @Operation varchar(16) ) returns nvarchar(max) as begin declare @Erg 2 nvarchar(max) = '' declare @Pattern nvarchar(max) = ' 3 4if exists (select top 1 1 5 from deleted d join DPRMemberShipAction m on d.XObjectkey = m.%key% 6 ) 7 begin 8 delete DPRMemberShipAction 9 from deleted d join DPRMemberShipAction m on d.XObjectkey = m.%key% 10 end 11 ' 12 if @Operation <> 'Delete' begin goto endlabel end select @erg = string_agg(convert(nvarchar(max), y.element ) , N'' ) from ( select distinct replace 13 (@pattern, '%key%' , case when x.ContainerTable = @ParentTable then 'ObjectKeyBase' when x.MemberTable = @ParentTable then 'ObjectKeyMember' else 'ObjectKeyMN' 14 end ) as element from ( select r.ParentTable as ContainerTable , r.ParentColumn as ContainerColumn , r.ChildColumn as ChildConnectContainer , rm.ParentTable 15 as MemberTable , rm.ParentColumn as MemberColumn , rm.ChildColumn as ChildConnectMember , nht.UID_DPRNameSpace , tc.TableName from QBM_VQBMRelation r 16join DPRNameSpaceHasDialogTable nht with (readpast) on r.UID_DialogTableChild = nht.UID_DialogTable and r.IsForUpdateXDateSubItem = 1 join QBM_VQBMRelation 17 rm on r.UID_QBMRelationMN = rm.UID_QBMRelation join DialogTable tc with (readpast) on r.ChildTable = tc.TableName and tc.isMNTable = 1 where (r.ParentTable 18 = @ParentTable or rm.ParentTable = @ParentTable ) and r.IsForUpdateXDateSubItem = 1 and nht.IsAdHocSingleMemberShip = 1 union select r.ParentTable as 19 ContainerTable , r.ParentColumn as ContainerColumn , r.ChildColumn as ChildConnectContainer , dbo.QBM_FGITableName(rm.UID_DialogTableReference) as MemberTable 20 , 'XObjectKey' as MemberColumn , ok.ColumnName as ChildConnectMember , nht.UID_DPRNameSpace , tc.TableName from QBM_VQBMRelation r join DPRNameSpaceHasDialogTable 21 nht with (readpast) on r.UID_DialogTableChild = nht.UID_DialogTable and r.IsForUpdateXDateSubItem = 1 join DialogColumn ok with (readpast) on ok.UID_DialogTable 22 = r.UID_DialogTableChild join DialogValidDynamicRef rm with (readpast) on ok.UID_DialogColumn = rm.UID_DialogColumn join DialogTable tc with (readpast 23) on ok.UID_DialogTable = tc.UID_DialogTable and tc.IsMAllTable = 1 where (r.ParentTable = @ParentTable or dbo.QBM_FGITableName(rm.UID_DialogTableReference 24) = @ParentTable ) and r.IsForUpdateXDateSubItem = 1 and nht.IsAdHocSingleMemberShip = 1 ) as x ) as y if @Erg > ' ' begin select @Erg = ' 25---------------------------------------------------------- 26-- Handle RI for DPRMemberShipAction 27---------------------------------------------------------- 28 ' 29 + dbo.QBM_FCVStringToIndent(@Erg, 1) + ' 30 31---------------------------------------------------------- 32-- / Handle RI for DPRMemberShipAction 33----------------------------------------------------------' 34 end else begin select @erg = '' end endLabel: return(@erg) end 35
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:35.593
None extracted.
Summary: writes DELETE DPRMemberShipAction; reads/joins deleted, DPRMemberShipAction, QBM_VQBMRelation, DPRNameSpaceHasDialogTable, DialogTable…
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
| nvarchar | OUTPUT |
@ParentTable | varchar(30) | input |
@Operation | varchar(16) | input |
DML targets
DELETE DPRMemberShipActionCalled 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: @ParentTable @Operation @Erg @Pattern @erg @pattern
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.DPR_PTriggerCreateMembership | SQL expression dependency | dbo · OBJECT_OR_COLUMN |