Subject | Re: [firebird-support] Value check that I don't now how to solve |
---|---|
Author | Alex Taylor |
Post date | 2003-11-30T14:20:43Z |
Hi Richard!
Create a UDF that takes a float parameter and simply give back the
fractional part of a number. (Like Delphi's FRAC function). Declare a
domain like this:
CREATE DOMAIN quarter_ AS
DECIMAL(18,2)
NOT NULL
CHECK (INT_(VALUE*4)=0)
If you multiply the input value with 4 and see the frac part of the
product, it must be zero in the right cases. This works for me.
Regards:Alex
Create a UDF that takes a float parameter and simply give back the
fractional part of a number. (Like Delphi's FRAC function). Declare a
domain like this:
CREATE DOMAIN quarter_ AS
DECIMAL(18,2)
NOT NULL
CHECK (INT_(VALUE*4)=0)
If you multiply the input value with 4 and see the frac part of the
product, it must be zero in the right cases. This works for me.
Regards:Alex