dbo.QBM_FTDialogProcessReady

SQL_TABLE_VALUED_FUNCTION

Created 2026-04-14T23:20:25.897 · modified 2026-04-14T23:20:25.897 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@ProcessesToCheckQBM_YSingleGUIDno

Referenced objects

SchemaObjectColumn/minorClass
dboDialogDBQueueOBJECT_OR_COLUMN
dboDialogDeferredOperationOBJECT_OR_COLUMN
dboDialogProcessChainOBJECT_OR_COLUMN
dboDialogWatchOperationOBJECT_OR_COLUMN
dboJobHistoryOBJECT_OR_COLUMN
dboJobQueueOBJECT_OR_COLUMN
dboPersonWantsOrgOBJECT_OR_COLUMN
dboQBM_FGIModuleExistsOBJECT_OR_COLUMN
dboQBM_YSingleGUIDTYPE
dboQBMDBQueueCurrentOBJECT_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

1create function dbo.QBM_FTDialogProcessReady (@ProcessesToCheck dbo.QBM_YSingleGUID readonly  ) returns @erg table( GenProcID varchar(38) collate database_default
2 , ReadyForDeleteOrExport int default 0 ) as begin declare @Worktable dbo.QBM_YSingleGUID    insert into @Worktable(UID_SingleGuid  , IntProperty  ) select
3 p.UID_SingleGuid , 4 from @ProcessesToCheck p  update @Worktable set IntProperty = 0  from @Worktable p where p.IntProperty = 4 and exists (select top
4 1 1 from dbo.DialogDBQueue q with (nolock) where q.GenProcID = p.UID_SingleGuid   and q.Generation >= 0 )  update @Worktable set IntProperty = 0  from
5 @Worktable p where p.IntProperty = 4 and exists (select top 1 1 from dbo.QBMDBQueueCurrent cu with (nolock) where cu.GenProcID = p.UID_SingleGuid  )  
6update @Worktable set IntProperty = 0  from @Worktable p where p.IntProperty = 4 and exists (select top 1 1 from dbo.DialogDeferredOperation de with (nolock
7) where de.GenProcID = p.UID_SingleGuid  )  update @Worktable set IntProperty = 0  from @Worktable p where p.IntProperty = 4 and exists (select top 1 1
8 from dbo.JobQueue q with (readpast) where q.GenProcID = p.UID_SingleGuid  ) if dbo.QBM_FGIModuleExists('QER') = 1 begin update @Worktable set IntProperty
9 = 0  from @Worktable p where p.IntProperty = 4 and exists (select top 1 1 from dbo.PersonWantsOrg q with (readpast) where q.GenProcID = p.UID_SingleGuid
10  ) end  update @Worktable set IntProperty = 0  from @Worktable p where p.IntProperty = 4 and exists (select top 1 1 from dbo.DialogWatchOperation w with
11 (nolock) where w.GenProcID = p.UID_SingleGuid  and w.ReadyForDeleteOrExport in( 0, 1) )  update @Worktable set IntProperty = 6 from @Worktable p where
12 IntProperty >= 4 and IntProperty <> 6 and exists (select top 1 1 from dbo.DialogWatchOperation w with (nolock) where w.GenProcID = p.UID_SingleGuid  and
13 w.ReadyForDeleteOrExport = 2 )  update @Worktable set IntProperty = 0  from @Worktable p where p.IntProperty >= 4 and exists (select top 1 1 from dbo.DialogProcessChain
14 c with (nolock) where c.GenProcID = p.UID_SingleGuid  and c.ReadyForDeleteOrExport in ( 0, 1) ) update @Worktable set IntProperty = 6 from @Worktable 
15p where p.IntProperty >= 4 and p.IntProperty <> 6 and exists (select top 1 1 from dbo.DialogProcessChain c with (nolock) where c.GenProcID = p.UID_SingleGuid
16  and c.ReadyForDeleteOrExport = 2 )  update @Worktable set IntProperty = 0  from @Worktable p where p.IntProperty >= 4 and exists (select top 1 1 from
17 dbo.JobHistory h with (nolock) where h.GenProcID = p.UID_SingleGuid  and h.ReadyForDeleteOrExport in ( 0, 1) ) update @Worktable set IntProperty = 6 from
18 @Worktable p where p.IntProperty >= 4 and p.IntProperty <> 6 and exists (select top 1 1 from dbo.JobHistory h with (nolock) where h.GenProcID = p.UID_SingleGuid
19  and h.ReadyForDeleteOrExport = 2 )  update @Worktable set IntProperty = 1 from @Worktable p where p.IntProperty = 4 update @Worktable set IntProperty
20 = 2  from @Worktable p where p.IntProperty = 6   insert into @erg (GenProcID, ReadyForDeleteOrExport) select w.UID_SingleGuid, w.IntProperty from @Worktable
21 w where w.IntProperty > 0 return end 
22

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:25.897

None extracted.

Summary: writes INSERT into; reads/joins DialogDBQueue, QBMDBQueueCurrent, DialogDeferredOperation, JobQueue, PersonWantsOrg…

Declared parameters

ParameterTypeDirection
@ProcessesToCheckqbm_ysingleguidinput

DML targets

INSERT into

Called routines

None extracted.

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @ProcessesToCheck @erg @Worktable

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_PDialogProcessShrink_markSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.QBM_PDialogProcessShrink_marksource text referencehas TRY/CATCH error handling