Back to OIM Explorer

dbo.QBM_FCVStringTrimLDSPrefix

Scalar FunctionSQL_SCALAR_FUNCTIONSandbox DB

Scalar Function.

Source: sandbox-db sys.sql_modules

Source size: 477 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

SQL42 lines
1CREATE FUNCTION dbo.QBM_FCVStringTrimLDSPrefix(2  @in nvarchar(4000)3) RETURNS nvarchar(40004)5  WITH SCHEMABINDING6AS7BEGIN8  DECLARE @erg nvarchar(4000)9  IF len(isnull(@in, N '')) < 610  BEGIN11    SELECT @erg = @in12    RETURN(@erg)13  END14  IF15  LEFT(@in,16  5) = CONCAT('#',17  'L',18  'D',19  'S',20  '#')21  BEGIN22    SELECT23      @erg = substring(@in,24      6,25      3995)26    IF27    RIGHT(@erg,28    1) = '|'29    BEGIN30      SELECT31        @erg = substring(@erg,32        1,33        len(@erg) -1)34    END35  END36  ELSE37  BEGIN38    SELECT @erg = @in39  END40  endLabel:41  RETURN(@erg)42END
Open raw exported source
SQL ยท Raw5 lines
1   create   function dbo.QBM_FCVStringTrimLDSPrefix (@in nvarchar(4000) ) returns nvarchar(4000) with SCHEMABINDING as begin declare @erg nvarchar2(4000) if len(isnull(@in, N'')) < 6 begin select @erg = @in  return(@erg)  end if left(@in, 5) = concat('#' , 'L' , 'D' , 'S' , '#') begin select @erg 3= substring(@in, 6, 3995) if right(@erg, 1) = '|' begin select @erg = substring(@erg, 1, len(@erg) -1) end end else begin select @erg = @in end endLabel:4 return (@erg) end 5