• Does the constant HAVE to be stored in a table??

    Would it not be easier to just have the UDF return the value? (it is constant after all)

    as in:

    CREATE FUNCTION fnGetConst(@cWanted INT)

    RETURNS VARCHAR(5)

    AS

    BEGIN

    DECLARE @RetValVARCHAR(5)

    SELECT @RetVal = case @cWanted when 1 THEN 'boo'

    when 2 THEN 'hoo' END

    return @RetVal

    END