Subject | RE: [firebird-support] Re: What does mean the NAN value found in some fields? |
---|---|
Author | Slavomir Skopalik |
Post date | 2009-08-09T09:21:32Z |
Hi, I can help you with win32 or win64 OS.
In pascal language code is this:
function UDF_IsNan(Number:PDouble):integer;cdecl;
begin
if Number=nil then begin result:=0; exit; end;
result:=ord(IsNan(Number^));
end;
(works in Delphi and freepascal).
Declaration in SQL is:
DECLARE EXTERNAL FUNCTION IsNan
DOUBLE PRECISION
RETURNS INTEGER BY VALUE
ENTRY_POINT 'UDF_IsNan' MODULE_NAME 'del_udf';
Note: not tested.
Slavek
Ing. Slavomir Skopalik
Jednatel spolecnosti
Elekt Labs s.r.o.
Chaloupky 158
783 72 Velky Tynec
Czech Republic
--------------------------------------------
Mobil: +420 724 207 851
icq:199 118 333
e-mail:skopalik@...
http://www.elektlabs.cz <http://www.elektlabs.cz/>
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Hernando Duque C
Sent: Friday, August 07, 2009 2:34 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: What does mean the NAN value found in some
fields?
and I don't know how to do that. I wonder if some one can help me with it.
HDuqueC.
[Non-text portions of this message have been removed]
In pascal language code is this:
function UDF_IsNan(Number:PDouble):integer;cdecl;
begin
if Number=nil then begin result:=0; exit; end;
result:=ord(IsNan(Number^));
end;
(works in Delphi and freepascal).
Declaration in SQL is:
DECLARE EXTERNAL FUNCTION IsNan
DOUBLE PRECISION
RETURNS INTEGER BY VALUE
ENTRY_POINT 'UDF_IsNan' MODULE_NAME 'del_udf';
Note: not tested.
Slavek
Ing. Slavomir Skopalik
Jednatel spolecnosti
Elekt Labs s.r.o.
Chaloupky 158
783 72 Velky Tynec
Czech Republic
--------------------------------------------
Mobil: +420 724 207 851
icq:199 118 333
e-mail:skopalik@...
http://www.elektlabs.cz <http://www.elektlabs.cz/>
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Hernando Duque C
Sent: Friday, August 07, 2009 2:34 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: What does mean the NAN value found in some
fields?
>It is a very elegant work arround to it, but I'm just the BD administrator
> Hi, you have to create a UDF function for this and use like this
>
> SELECT ... WHERE IsNan(myfield)>0
>
> or UPDATE WHERE IsNan(myfield)>0
and I don't know how to do that. I wonder if some one can help me with it.
HDuqueC.
[Non-text portions of this message have been removed]