Subject error in dnvl udf (fbudf)
Author Ernesto Cullen
Hi all,
I have a problem using the udf named dnvl from fbudf.dll using Firebird 1.02. I issue the following sentence

select sum(ImporteTotal) from Pagos

Field ImporteTotal is numeric(18,2). The result is 605. When I narrow the scope using where, it returns NULL:

select sum(ImporteTotal) from pagos where Fecha<'2002-01-01'

I cannot process nulls so i add the DNVL function to the mix:

select DNVL(Sum(ImporteTotal),0) from pagos where Fecha<'2002-01-01'

it gets 0. Correct!
_BUT_
if I issue

select DNVL(Sum(ImporteTotal),0) from pagos

if gets 2.98909715733954E-319

which is evidently incorrect. Am I doing something wrong, or is there a problem with udf implementation?
And another question: if the ImporteTotal field were Numeric(18,6), do I have to use dnvl, invl or i64nvl?

TIA

Ernesto Cullen


[Non-text portions of this message have been removed]