Subject OT:What fields to use
Author Riho-Rene Ellermaa
Hi!
Sorry about OT, but the Mers list seems to be down (They should also come
over to egroups).
>
Stupid question, but anyway:

I have table:
CREATE TABLE TEST (
X1 NUMERIC(15,2) NOT NULL, /* price*/
X2 NUMERIC(15,3) NOT NULL /* amount */
);

When I enter the values X1=10.0965 and X2=1000, X1 looks 10.10 in table
which is OK.
When I calculate value X1*X2, I get 10096.5, not 10100.0!!
I looks especially funny when I do
select X1,X2,X1*X2 as total from test;

What am I doing wrong? The price field value looks like this, because it is
calculated medium price.
I thought that by saving as numeric(15,2) I can get rid of the extra
numbers

Riho-Rene Ellermaa
senior programmer
Hansabank
>