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.

Open formatted source/search result

Parameters

NameTypeOutput
bityes
@ObjectKeyDestinationvarcharno
@DestinationIsForITShopbitno
@DestinationIsITShopOnlybitno
@ObjectKeyElementvarcharno
@ElementIsForITShopbitno
@ElementIsITShopOnlybitno

Referenced objects

SchemaObjectColumn/minorClass
dboQBM_FCVObjectkeyToElementOBJECT_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   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

ParameterTypeDirection
bitOUTPUT
@ObjectKeyDestinationvarchar(138)input
@DestinationIsForITShopbitinput
@DestinationIsITShopOnlybitinput
@ObjectKeyElementvarchar(138)input
@ElementIsForITShopbitinput
@ElementIsITShopOnlybitinput

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 objectRelationEvidence
dbo.ADS_TIADSAccountInADSGroupSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.ADS_TIADSContactInADSGroupSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.ADS_TIADSMachineInADSGroupSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.ADS_TIBaseTreeHasADSGroupSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.LDP_TIBaseTreeHasLDAPGroupSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.LDP_TILDAPAccountInLDAPGroupSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.LDP_TILDPMachineInLDAPGroupSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.QER_TIBaseTreeHasQERAssignSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.QER_TIBaseTreeHasQERResourceSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.QER_TIBaseTreeHasQERReuseSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.QER_TIBaseTreeHasQERReuseUSSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.QER_TIPersonHasQERAssignSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.QER_TIPersonHasQERResourceSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.QER_TIPersonHasQERReuseSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.QER_TIPersonHasQERReuseUSSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.RMS_TIBaseTreeHasESetSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.RMS_TIPersonHasESetSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.RMS_TIWorkDeskHasESetSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.RPS_TIBaseTreeHasRPSReportSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.RPS_TIPersonHasRPSReportSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIBaseTreeHasTSBAccountDefSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIBaseTreeHasUNSGroupBSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIBaseTreeHasUNSGroupB1SQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIBaseTreeHasUNSGroupB2SQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIBaseTreeHasUNSGroupB3SQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIPersonHasTSBAccountDefSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIUNSAccountBHasUNSGroupBSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIUNSAccountBHasUNSGroupB1SQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIUNSAccountBHasUNSGroupB2SQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIUNSAccountBHasUNSGroupB3SQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIUNSAccountBInUNSGroupBSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIUNSAccountBInUNSGroupB1SQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIUNSAccountBInUNSGroupB2SQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSB_TIUNSAccountBInUNSGroupB3SQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.TSBVDirectAssignWrongSQL expression dependencydbo · OBJECT_OR_COLUMN