dbo.QBM_TUDialogSchedule

SQL_TRIGGER parent DialogSchedule

Created 2025-06-27T18:01:01.033 · modified 2026-04-14T23:23:08.150 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
No parameters.

Referenced objects

SchemaObjectColumn/minorClass
deletedOBJECT_OR_COLUMN
DialogScheduleOBJECT_OR_COLUMN
DialogTimeZoneOBJECT_OR_COLUMN
insertedOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
dboQBM_FGIScheduleNextRunOBJECT_OR_COLUMN
dboQBM_FGISessionContextOBJECT_OR_COLUMN
dboQBM_FGITimeIsValidOBJECT_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   trigger QBM_TUDialogSchedule on DialogSchedule  for update not for Replication as begin declare @jetzt datetime = getutcdate() declare
2 @XUser nvarchar(64) = object_name(@@procid) declare @Xdate datetime = getutcdate() BEGIN TRY if exists (select top 1 1 from inserted) goto start return
3 start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') if update(StartTime) begin if exists (select top 1 1 from inserted
4 i where dbo.QBM_FGITimeIsValid(i.starttime) < 0 ) begin  raiserror( '#LDS#The time entered is not valid, must be between 00:00 and 23:59 or empty.|', 
518, 3) with nowait end end if update(Enabled) or update(StartDate) or update(EndDate) or update(Frequency) or update(FrequencyType) or update(FrequencySubType
6) or update(StartTime) or update(UID_DialogTimeZone) begin        update DialogSchedule set EndDate = '2200-01-01' , XDateUpdated = @Xdate , XUserUpdated
7 = @XUser from DialogSchedule s join deleted i on s.UID_DialogSchedule = i.UID_DialogSchedule where s.EndDate is null update DialogSchedule set NextRun
8 = dbo.QBM_FGIScheduleNextRun ('1899-12-31'  , '1899-12-31'  , case  when isnull(s.StartDate, '1900-01-01') > @jetzt and s.FrequencyType not in ('Week'
9, 'Month', 'Year', 'Day') then s.StartDate when isnull(s.StartDate, '1900-01-01') > @jetzt and s.FrequencyType in ('Week', 'Month', 'Year') then dateadd
10 (dd, -1, s.StartDate) when isnull(s.StartDate, '1900-01-01') > @jetzt and s.FrequencyType in ('Day') then dateadd (hh, -1, s.StartDate) else @jetzt end
11 , s.StartTime  , s.FrequencyType  ,  case when isnull(s.StartDate, '1900-01-01') > @jetzt  and s.FrequencyType not in ('Week', 'Month', 'Year', 'Day')
12 and s.FrequencyType not like 'WD[_]%' then 0 when s.FrequencyType like 'WD[_]%' then s.Frequency else 1 end , s.FrequencySubType  , isnull(tz.CurrentUTCOffset
13, 0)  ) , XDateUpdated = @Xdate , XUserUpdated = @XUser from DialogSchedule s join deleted i on s.UID_DialogSchedule = i.UID_DialogSchedule left outer 
14join DialogTimeZone tz on s.UID_DialogTimeZone = tz.UID_DialogTimeZone where isnull(s.EndDate, '2200-01-01') > @jetzt  and s.Enabled = 1 update DialogSchedule
15 set nextrun = '2200-01-01' , LastRun = '1900-01-02' , XDateUpdated = @Xdate , XUserUpdated = @XUser from DialogSchedule s join deleted d on s.UID_DialogSchedule
16 = d.UID_DialogSchedule where s.EndDate < @jetzt or s.Enabled = 0 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH 
17NOWAIT END CATCH end 
18

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:23:08.150

uses session context values has TRY/CATCH error handling

Summary: calls QBM_PSessionErrorAdd; writes UPDATE not, UPDATE DialogSchedule; reads/joins inserted, DialogSchedule, deleted, DialogTimeZone

Declared parameters

No declared parameters in sys.parameters for this object, or metadata was not available.

DML targets

UPDATE not UPDATE DialogSchedule

Called routines

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: #LDS #The

Variables: @jetzt @XUser @procid @Xdate @GenProcID

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.