Subject | Re: [firebird-support] Re: Numeric rounding? |
---|---|
Author | Ivan Prenosil |
Post date | 2005-01-05T18:04:30Z |
> > > I have a table (FB 1.5) with a field defined as Numeric(12,4). I useCREATE TABLE tab (A NUMERIC(12,4));
INSERT INTO tab VALUES (123.4567);
> > > this field in a store procedure with a variable defined asCREATE PROCEDURE proc RETURNS (x1 NUMERIC(12,4), x2 VARCHAR(20)) AS
> > > Numeric(12,2).
DECLARE VARIABLE var NUMERIC(12,2);
> When the field is selected into the variableBEGIN
SELECT a FROM tab INTO :var;
x1 = :var;
x2 = :var;
END
> it storesEXECUTE PROCEDURE proc;
> > > something like 123.4567 in the defined variable instead of rounding it
> > > to 123.46 as expected.
X1 X2
========== ============
123.4600 123.46
What are you doing differently ?
Ivan