dbo.QBM_ZStateUTCOffset
SQL_STORED_PROCEDURE
Created 2025-06-27T17:58:58.540 · modified 2026-04-14T23:20:29.210 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumber | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogState | OBJECT_OR_COLUMN | ||
| DialogStateHasTimeZone | OBJECT_OR_COLUMN | ||
| DialogTimeZone | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_bulk | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDBQueueCurrent | TYPE | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBMDBQueueCurrent | 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_ZStateUTCOffset (@SlotNumber int) as begin declare @uid_dialogState varchar(38) declare @AVGUTCOffSet int declare @IsDayLightSaving 2 bit declare @GenProcID varchar(38) declare @DBQueueCurrent QBM_YDBQueueCurrent declare @XUser nvarchar(64) = object_name(@@procid) declare @Xdate datetime 3 = getutcdate() BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter 4, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount = 0 begin goto EndLabel end select 5 top 1 @GenProcID = GenProcID from @DBQueueCurrent p declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (Object, SubObject, GenProcID 6) select x.uid, null, @GenProcID from (select distinct s.UID_DialogState as uid from DialogState s join @DBQueueCurrent cu on cu.UID_Parameter = s.UID_DialogState 7 left outer join DialogStateHasTimeZone sht on s.UID_DialogState = sht.UID_DialogState left outer join DialogTimeZone tz on sht.UID_DialogTimeZone = tz.UID_DialogTimeZone 8 and tz.UTCOffset is not null where tz.UID_DialogTimeZone is null ) as x exec QBM_PDBQueueInsert_bulk 'QBM-K-CommonStateUTCOffset2', @DBQueueElements_01 9 delete @DBQueueCurrent from @DBQueueCurrent cu join @DBQueueElements_01 el on cu.UID_Parameter = el.Object update DialogState set AVGUTCOffSet = x.AVGUTCOffSet 10 , IsDayLightSaving = x.IsDayLightSaving , XDateUpdated = @Xdate , XUserUpdated = @XUser from DialogState su join ( select s.UID_DialogState, avg(tz.UTCOffset 11) as AVGUTCOffset, sign(max(convert(int, tz.IsDayLightSaving))) as IsDayLightSaving from @DBQueueCurrent cu join DialogState s on cu.UID_Parameter = s.UID_DialogState 12 join DialogStateHasTimeZone sht on s.UID_DialogState = sht.UID_DialogState join DialogTimeZone tz on sht.UID_DialogTimeZone = tz.UID_DialogTimeZone and 13 tz.UTCOffset is not null group by s.UID_DialogState ) as x on su.UID_DialogState = x.UID_DialogState where isnull(su.AVGUTCOffset, 0) <> x.AVGUTCOffSet 14 or isnull(su.IsDayLightSaving, 0) <> x.IsDayLightSaving END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH 15 endLabel: return end 16
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.210
inserts DBQueue tasks has TRY/CATCH error handling
Summary: calls QBM_PDBQueueInsert_bulk, QBM_PSessionErrorAdd; writes INSERT into, UPDATE DialogState; reads/joins QBMDBQueueCurrent, DialogState, DialogStateHasTimeZone, DialogTimeZone
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
DML targets
INSERT into UPDATE DialogStateCalled routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
QBM-K-CommonStateUTCOffset2Temp tables / referenced variables
Temp: None extracted.
Variables: @SlotNumber @uid_dialogState @AVGUTCOffSet @IsDayLightSaving @GenProcID @DBQueueCurrent @XUser @procid @Xdate @rowcount @DBQueueElements_01
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.
No reverse dependencies extracted.