dbo.QBM_PXDateSubItemUpdate
SQL_STORED_PROCEDURE
Created 2025-06-27T17:58:59.113 · modified 2026-04-14T23:20:29.950 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumber | int | no |
@FullSyncVariable | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogColumn | OBJECT_OR_COLUMN | ||
| JobEventGen | OBJECT_OR_COLUMN | ||
| QBM_PExecuteSQLWithRetry_LLP | OBJECT_OR_COLUMN | ||
| QBM_PJournal | OBJECT_OR_COLUMN | ||
| QBM_PSessionContextSet | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorClean | OBJECT_OR_COLUMN | ||
| QBM_YCursorBuffer | TYPE | ||
| QBM_YDBQueueCurrent | TYPE | ||
| QBMDBQueueCurrent | OBJECT_OR_COLUMN | ||
| QBMEvent | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVDatetimeToStringUTC | OBJECT_OR_COLUMN | |
| dbo | QBM_FCVIntToString | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIBitPatternXMarkedForDel | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIColumnExistsInSchema | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIPrimaryKeyName_F | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionErrorRethrow | OBJECT_OR_COLUMN | |
| dbo | QBM_FGITableName | OBJECT_OR_COLUMN | |
| dbo | QBM_PJobCreate_HOUpdate_B | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure QBM_PXDateSubItemUpdate (@SlotNumber int , @FullSyncVariable int = 0 ) AS begin declare @UID_dialogtable varchar(38) declare 2 @TableName varchar(30) declare @PKColumnName varchar(39) declare @Whereclause nvarchar(max) declare @SQLCmd nvarchar(max) declare @JustNow varchar(64) 3 = dbo.QBM_FCVDatetimeToStringUTC(getutcdate()) declare @MyXUser nvarchar(64) = object_name(@@procid) declare @MitEvent bit = 0 declare @GenProcID varchar 4(38) declare @WhereClauseAdditional nvarchar(max) declare @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('') declare @XUser_R nvarchar(64) = dbo.QBM_FGISessionContext 5('XUser') declare @ElementBuffer QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int declare @DebugLevel varchar(1) = 'W' declare @DBQueueCurrent 6 QBM_YDBQueueCurrent declare @JournalMessage nvarchar(4000) SET XACT_ABORT OFF BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, 7UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber 8 = @SlotNumber if @@rowcount = 0 begin goto EndLabel end select @WhereClauseAdditional = N' isnull(XDateSubItem, ''1899-12-30'') < ''' + @JustNow + ''' ' 9 insert into @ElementBuffer (UID1, UID2) select cu.UID_SubParameter , cu.GenProcID from @DBQueueCurrent cu group by cu.UID_SubParameter , cu.GenProcID 10 select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @UID_DialogTable = bu.UID1 , @GenProcID 11 = bu.UID2 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex if exists(select top 1 1 from JobEventGen e join QBMEvent et on e.UID_QBMEvent 12= et.UID_QBMEvent where et.UID_DialogTable = @UID_dialogtable and et.EventName = 'update' ) begin select @MitEvent = 1 end select @TableName = dbo.QBM_FGITableName 13(@uid_dialogtable) if isnull(@TableName, '') = '' begin select @JournalMessage = concat('#LDS#Invalid UID_DialogTable: "{0}".|' , @uid_dialogtable, '|' 14) exec QBM_PJournal @JournalMessage, @@procid,'E', @DebugLevel select @ElementIndex += 1 continue end select @PKColumnName = dbo.QBM_FGIPrimaryKeyName_F 15(@TableName, 1) select @Whereclause = @PKColumnName + ' in (select UID_Parameter /* the element */ 16 from QBMDBQueueCurrent with (readpast) 17 where Slotnumber = ' 18 + str(@Slotnumber) + ' 19 and UID_SubParameter = ''' + @UID_DialogTable + ''' 20 and GenProcID = ''' + @GenProcID + ''' 21 ) 22 ' 23 if exists (select top 1 1 from DialogColumn c where c.uid_DialogTable = @UID_DialogTable and c.ColumnName = 'XMarkedForDeletion' ) begin select @Whereclause 24 = @Whereclause + ' and XMarkedForDeletion & ' + dbo.QBM_FCVIntToString( dbo.QBM_FGIBitPatternXMarkedForDel('|OutStanding|', 0)) + ' = 0' end if @FullSyncVariable 25 = 1 or @MitEvent = 0 begin exec QBM_PSessionContextSet 'GenProcID', @GenProcID exec QBM_PSessionContextSet 'XUser', @MyXUser select @SQLCmd = concat('update ' 26 , @TableName , ' 27 set XDateSubItem = ''' , @JustNow , ''' 28 ', case dbo.QBM_FGIColumnExistsInSchema(@TableName, 'XDateUpdated') when 1 then ', XDateUpdated = getutcdate(), XUserUpdated = ''' 29 + object_name(@@procid) + '''' else '' end, ' 30 where ' , @Whereclause , ' 31 and ' , @WhereClauseAdditional ) BEGIN TRY exec QBM_PExecuteSQLWithRetry_LLP 32 @SQLStatement = @SQLcmd , @LockTimeout_ms = default , @MaxWaitTimeForLock_s = default , @ProcIDForJournal = default , @HandleErrorSilent = 0 , @ExecuteWithTransact 33 = 0 END TRY BEGIN CATCH exec QBM_PSessionErrorClean END CATCH end else begin exec dbo.QBM_PJobCreate_HOUpdate_B @TableName, @Whereclause, @GenProcID 34, @p1 = 'XDateSubItem', @v1 = @JustNow , @WhereClauseAdditional = @WhereClauseAdditional , @AdditionalObjectKeysAffected = DEFAULT end select @ElementIndex 35 += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 36 18, 1) WITH NOWAIT END CATCH EndLabel: exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R exec QBM_PSessionContextSet 'XUser', @XUser_R return end 37
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:29.950
creates object-layer jobs via QBM_PJobCreate* uses session context values has TRY/CATCH error handling
Summary: calls QBM_PJournal, QBM_PSessionContextSet, QBM_PExecuteSQLWithRetry_LLP, QBM_PSessionErrorClean, QBM_PJobCreate_HOUpdate_B…; writes INSERT into; reads/joins QBMDBQueueCurrent, JobEventGen, QBMEvent, DialogColumn; uses session context XUser, GenProcID
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
@FullSyncVariable | int | input |
DML targets
INSERT intoCalled routines
Read/join references
SQL dependency metadata
- DialogColumn
- JobEventGen
- QBM_PExecuteSQLWithRetry_LLP
- QBM_PJournal
- QBM_PSessionContextSet
- QBM_PSessionErrorAdd
- QBM_PSessionErrorClean
- QBM_YCursorBuffer
- QBM_YDBQueueCurrent
- QBMDBQueueCurrent
- QBMEvent
- dbo.QBM_FCVDatetimeToStringUTC
- dbo.QBM_FCVIntToString
- dbo.QBM_FGIBitPatternXMarkedForDel
- dbo.QBM_FGIColumnExistsInSchema
- dbo.QBM_FGIPrimaryKeyName_F
- dbo.QBM_FGISessionContext
- dbo.QBM_FGISessionErrorRethrow
- dbo.QBM_FGITableName
- dbo.QBM_PJobCreate_HOUpdate_B
Config/session
Config: None extracted.
Session: XUser GenProcID
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: #LDS #Invalid
Variables: @SlotNumber @FullSyncVariable @UID_dialogtable @TableName @PKColumnName @Whereclause @SQLCmd @JustNow @MyXUser @procid @MitEvent @GenProcID @WhereClauseAdditional @GenProcID_R @XUser_R @ElementBuffer @ElementCount @ElementIndex @DebugLevel @DBQueueCurrent @JournalMessage @rowcount @ROWCOUNT @UID_DialogTable @uid_dialogtable @Slotnumber @SQLStatement @SQLcmd @LockTimeout_ms @MaxWaitTimeForLock_s @ProcIDForJournal @HandleErrorSilent @ExecuteWithTransact @p1 @v1 @AdditionalObjectKeysAffected @Rethrow
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_ZXDateSubItemUpdate | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_ZXDateSubItemUpdateFU | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_ZXDateSubItemUpdate | source text reference | has TRY/CATCH error handling |
| dbo.QBM_ZXDateSubItemUpdateFU | source text reference | has TRY/CATCH error handling |