The T-SQL ISNULL() function works the same as VFP NVL().
>I need some help to create a function that works the same way as VFP NVL function but only for integer or numeric fields.
>I try it with integer fields and it doesnt work.
>Any idea how to do it ?
>
>TIA
>
>
>create function NVL(@valor int, @Inicio int)
>RETURNS int
>AS
>SELECT CASE
> WHEN @Valor IS NULL AND @Inicio IS NULL THEN NULL
> WHEN @Valor IS NULL AND @Inicio IS NOT NULL THEN @Inicio
> WHEN @Valor IS NOT NULL THEN @Valor
>END
>
--sb--