Subject Re: [ib-support] where can i download fbudf.dll for external NULL functions
Author Claudio Valderrama C.
""jyotindra_bhoyania"" <jyotindra_bhoyania@...> wrote in message
news:a3al2i+l7ro@......
> Hello..
>
> we have serious problem of checking null values. is there any
> solutions for it.
>
> We have written query and in that query i am doing minus value from
> the another value like.
> select val1 - val2 from table.
>
> val1 has value but val2 is "NULL" so i get null value finaly.

When you find that you are doing this NVL trick too often, it means you
design is screwed and you should consider making the troblesome field
mandatory with a default of zero or empty string, depending on the data
type.

fbudf can be downloaded from
www.cvalde.com/utilities/fbudf.zip
but you should be very careful to use a version of NVL that returns the data
type that it declares (that in turn should be the same than the input
params) or you will get garbage! This is a limitation of the engine that I
plan to remove when I do my own paid release.
:-)

In a few words, if you use invl that returns an integer, be sure both input
params are integers, too.

Use fbudf at your own risk, of course.

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing