dbo.QER_FTPwoValidDateRangeAssign
SQL_TABLE_VALUED_FUNCTION
Created 2026-04-14T23:17:27.350 · modified 2026-04-14T23:17:27.350 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@ObjectKeyAssignment | varchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| PersonWantsOrg | OBJECT_OR_COLUMN | ||
| QBM_YDateTimePair | TYPE | ||
| dbo | QBM_FCVDatetimeToDatetimeEve | OBJECT_OR_COLUMN | |
| dbo | QBM_FCVStringToInt | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIConfigparmValue | OBJECT_OR_COLUMN | |
| dbo | QBM_FTDateTimeGaps | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1create function dbo.QER_FTPwoValidDateRangeAssign( @ObjectKeyAssignment varchar(138) ) returns @erg table(FromDatetime datetime , UntilDatetime datetime 2 ) as begin declare @heute datetime = getutcdate() declare @ist QBM_YDateTimePair declare @GapDefinition int = 0 select @GapDefinition = dbo.QBM_FCVStringToInt 3(dbo.QBM_FGIConfigparmValue('QER\ITShop\GapBehavior\GapDefinition'), 0) insert into @ist (FromDate , ToDate) select case when isnull(pwo.ValidFrom, '1899-12-30' 4) < @heute then @heute else pwo.ValidFrom end , dbo.QBM_FCVDatetimeToDatetimeEve(isnull(pwo.ValidUntil, '2200-01-01')) from PersonWantsOrg pwo where pwo.ObjectKeyAssignment 5 = @ObjectKeyAssignment and (pwo.OrderState in ('Assigned', 'Granted', 'New', 'OrderProduct', 'OrderProlongate', 'OrderUnsubscribe', 'Waiting') 6and @GapDefinition = 0 or pwo.OrderState in ('Assigned', 'Granted', 'OrderProlongate', 'OrderUnsubscribe', 'Waiting') and @GapDefinition = 1 or pwo.OrderState 7 in ('Assigned', 'OrderProlongate', 'OrderUnsubscribe' ) and @GapDefinition = 2 ) insert into @erg(FromDatetime, UntilDatetime) select g.GapStart, g.GapEnd 8 from dbo.QBM_FTDateTimeGaps(@ist) g endLabel: return end 9
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:17:27.350
None extracted.
Summary: writes INSERT into; reads/joins PersonWantsOrg, QBM_FTDateTimeGaps; uses config QER\ITShop\GapBehavior\GapDefinition
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@ObjectKeyAssignment | varchar(138) | input |
DML targets
INSERT intoCalled routines
None extracted.
Read/join references
SQL dependency metadata
Config/session
Config: QER\ITShop\GapBehavior\GapDefinition
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @ObjectKeyAssignment @erg @heute @ist @GapDefinition
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.