Subject | Re: [firebird-support] Re: What does mean the NAN value found in some fields? |
---|---|
Author | Hans |
Post date | 2009-08-11T20:11:01Z |
I think the following works out the same
UPDATE my_table SET my_field = Coalesce(my_field,0);
UPDATE my_table SET my_field = Coalesce(my_field,0);
----- Original Message -----
From: "Hernando Duque C" <duque.hernando@...>
To: <firebird-support@yahoogroups.com>
Sent: Tuesday, August 11, 2009 12:51 PM
Subject: [firebird-support] Re: What does mean the NAN value found in some
fields?
> Hi to all,
>
> As sugested by Slavek, here it is the tested UDF used to fix the fields
> with NAN values (compiled with Delphi):
>
> library my_udf;
>
> uses
> SysUtils,
> Classes;
>
> {$R *.res}
>
> function UDF_IsNan(Number: PDouble): Double; StdCall; export;
> begin
> Result := Number^;
> if (Result <> 0) then
> Result := Number^
> else
> Result := 0;
> end;
>
> exports
> UDF_IsNan;
>
> begin
> end.
>
> These where de SQL expresions used:
>
> DECLARE EXTERNAL FUNCTION IsNan
> DOUBLE PRECISION
> RETURNS DOUBLE PRECISION BY VALUE
> ENTRY_POINT 'UDF_IsNan' MODULE_NAME 'my_udf.dll';
>
> UPDATE my_table SET my_field = IsNan(my_field);
>
> Once more let me say thank you very much for your help.
>
> HDuqueC.
>
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>