Back to OIM Explorer

dbo.QER_FGIOrgRootName

Scalar FunctionSQL_SCALAR_FUNCTIONSandbox DB

Scalar Function.

Source: sandbox-db sys.sql_modules

Source size: 520 characters

Interpretation

  • Database function. Usually supports views, validation, or calculated predicates; look at referenced-by entries for callers.

Relations

  • No extracted relations.

Typed Edges

  • No typed edges extracted for this source.

Complete Source

SQL31 lines
1CREATE FUNCTION dbo.QER_FGIOrgRootName(2  @uid_OrgRoot nvarchar(64)3) RETURNS nvarchar(644)5  WITH SCHEMABINDING6AS7BEGIN8  DECLARE @erg nvarchar(64)9  IF @uid_OrgRoot IN('VAERole',10  'VDepartment',11  'VITShopOrg',12  'VITShopSrc',13  'VLocality',14  'VNonCompliance',15  'VProfitCenter')16  BEGIN17    SELECT18      @erg = rtrim(substring(@uid_OrgRoot, 2, 37))19    RETURN(@erg)20  END21  IF @uid_OrgRoot LIKE '[A-Z][0-Z][0-Z]-V-%'22  BEGIN23    SELECT24      @erg = SUBSTRING(@uid_OrgRoot,25      7,26      31)27    RETURN(@erg)28  END29  SELECT @erg = 'Org' endLabel:30  RETURN(@erg)31END
Open raw exported source
SQL ยท Raw5 lines
1   create   function dbo.QER_FGIOrgRootName (@uid_OrgRoot nvarchar(64) ) returns nvarchar(64) with SCHEMABINDING as begin declare @erg nvarchar(642)  if @uid_OrgRoot in ( 'VAERole', 'VDepartment', 'VITShopOrg', 'VITShopSrc', 'VLocality', 'VNonCompliance', 'VProfitCenter' ) begin select @erg = rtrim3(substring(@uid_OrgRoot,2,37))  return(@erg)  end  if @uid_OrgRoot like '[A-Z][0-Z][0-Z]-V-%'   begin select @erg = SUBSTRING(@uid_OrgRoot, 7, 31)  return4(@erg)  end  select @erg = 'Org' endLabel: return(@erg) end 5