dbo.QER_FGIITShopFlagCombineValid
SQL_SCALAR_FUNCTION
Created 2025-06-27T17:59:27.163 · modified 2026-04-14T23:20:36.087 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| bit | yes |
@ObjectKeyDestination | varchar | no |
@DestinationIsForITShop | bit | no |
@DestinationIsITShopOnly | bit | no |
@ObjectKeyElement | varchar | no |
@ElementIsForITShop | bit | no |
@ElementIsITShopOnly | bit | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| dbo | QBM_FCVObjectkeyToElement | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create function dbo.QER_FGIITShopFlagCombineValid ( @ObjectKeyDestination varchar(138) ,@DestinationIsForITShop bit , @DestinationIsITShopOnly 2 bit , @ObjectKeyElement varchar(138) , @ElementIsForITShop bit , @ElementIsITShopOnly bit ) returns bit as begin declare @DestinationTable nvarchar 3(32) declare @ElementTable nvarchar(32) declare @msg nvarchar(1000) declare @erg bit = 1 select @DestinationTable = dbo.QBM_FCVObjectkeyToElement('TableName' 4, @ObjectKeyDestination) select @ElementTable = dbo.QBM_FCVObjectkeyToElement('TableName', @ObjectKeyElement) if @ElementIsForITShop is null or @ElementIsITShopOnly 5 is null begin select @msg = '#LDS#internal error, irregular null value @ElementIsForITShop.|' select @erg = 0 return(@erg) end if @ElementIsForITShop 6 = 0 and @ElementIsITShopOnly = 1 begin select @msg = '#LDS#Invalid flag combination for IsForITShop and IsITShopOnly. in table {0}.|' + @ElementTable 7+ '|' select @erg = 0 return(@erg) end if @DestinationTable = 'ESet' begin if @DestinationIsForITShop = 0 and @DestinationIsITShopOnly = 1 begin select 8 @msg = '#LDS#Invalid flag combination for IsForITShop and IsITShopOnly. in table {0}.|' + @DestinationTable + '|' select @erg = 0 return(@erg) end if 9 @DestinationIsForITShop = 0 and @DestinationIsITShopOnly = 0 begin if @ElementIsForITShop = 1 and @ElementIsITShopOnly = 1 begin select @msg = '#LDS#Invalid combination of IT Shop flags from system roles and {0}.|' 10 + @ElementTable + '|' select @erg = 0 return(@erg) end end if @DestinationIsForITShop = 1 and @DestinationIsITShopOnly = 0 begin if @ElementIsForITShop 11 = 1 and @ElementIsITShopOnly = 1 begin select @msg = '#LDS#Invalid combination of IT Shop flags from system roles and {0}.|' + @ElementTable + '|' select 12 @erg = 0 return(@erg) end end if @DestinationIsForITShop = 1 and @DestinationIsITShopOnly = 1 begin select @msg = '#LDS#Nothing to test.|' return(@erg 13) end end else begin if @ElementIsForITShop = 0 begin if @DestinationTable in ('ITShopOrg', 'ITShopSrc') begin select @msg = '#LDS#IT Shop tables are not allowed as assignment objects if IsForITShop = 0.|' 14 select @erg = 0 return(@erg) end end if @ElementIsForITShop = 1 and @ElementIsITShopOnly = 0 begin select @msg = '#LDS#Nothing to test.|' return(@erg 15) end if @ElementIsForITShop = 1 and @ElementIsITShopOnly = 1 begin if @DestinationTable not in ('ITShopOrg', 'ITShopSrc', 'MirrorShop') begin select 16 @msg = '#LDS#Target of assignment {0} is not permitted with the combination of flags IsForITShop = 1 and IsITShopOnly = 1.|' + @DestinationTable + '|' 17 select @erg = 0 return(@erg) end end end EndLabel: return (@erg) 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:20:36.087
None extracted.
Summary: reads/joins system
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
| bit | OUTPUT |
@ObjectKeyDestination | varchar(138) | input |
@DestinationIsForITShop | bit | input |
@DestinationIsITShopOnly | bit | input |
@ObjectKeyElement | varchar(138) | input |
@ElementIsForITShop | bit | input |
@ElementIsITShopOnly | bit | input |
DML targets
None extracted.Called routines
None extracted.
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: #LDS #internal #Invalid #Nothing #IT #Target
Variables: @ObjectKeyDestination @DestinationIsForITShop @DestinationIsITShopOnly @ObjectKeyElement @ElementIsForITShop @ElementIsITShopOnly @DestinationTable @ElementTable @msg @erg
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.ADS_TIADSAccountInADSGroup | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.ADS_TIADSContactInADSGroup | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.ADS_TIADSMachineInADSGroup | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.ADS_TIBaseTreeHasADSGroup | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.LDP_TIBaseTreeHasLDAPGroup | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.LDP_TILDAPAccountInLDAPGroup | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.LDP_TILDPMachineInLDAPGroup | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QER_TIBaseTreeHasQERAssign | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QER_TIBaseTreeHasQERResource | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QER_TIBaseTreeHasQERReuse | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QER_TIBaseTreeHasQERReuseUS | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QER_TIPersonHasQERAssign | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QER_TIPersonHasQERResource | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QER_TIPersonHasQERReuse | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.QER_TIPersonHasQERReuseUS | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.RMS_TIBaseTreeHasESet | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.RMS_TIPersonHasESet | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.RMS_TIWorkDeskHasESet | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.RPS_TIBaseTreeHasRPSReport | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.RPS_TIPersonHasRPSReport | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIBaseTreeHasTSBAccountDef | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIBaseTreeHasUNSGroupB | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIBaseTreeHasUNSGroupB1 | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIBaseTreeHasUNSGroupB2 | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIBaseTreeHasUNSGroupB3 | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIPersonHasTSBAccountDef | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIUNSAccountBHasUNSGroupB | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIUNSAccountBHasUNSGroupB1 | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIUNSAccountBHasUNSGroupB2 | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIUNSAccountBHasUNSGroupB3 | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIUNSAccountBInUNSGroupB | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIUNSAccountBInUNSGroupB1 | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIUNSAccountBInUNSGroupB2 | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSB_TIUNSAccountBInUNSGroupB3 | SQL expression dependency | dbo · OBJECT_OR_COLUMN |
| dbo.TSBVDirectAssignWrong | SQL expression dependency | dbo · OBJECT_OR_COLUMN |