Hello, Konstantin!

Konstantin R. Beliaev wrote:

http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_60_exact_num_fs

"The scales of these operation _except_division_ are specified by the

> Блин, ну нафига было к делению применять правило, определенное для
> умножения... :-((

у тебя проблемы с английским - не то читаешь

Results of / and AVG

All arithmetic operations in dialect 3 produce the results, and the types of results, called for by the SQL-92 standard, which in some cases are not what customers have learned to expect in previous releases of InterBase. The most serious potential problems for a customer migrating from V5 or earlier to V6 involve the division operator and the AVG function (which also implies division) with operands of exact numeric types.

If at least one operand of a division operator has an approximate numeric type (FLOAT, REAL, or DOUBLE PRECISION) then the result of the division will be DOUBLE PRECISION, and will be exactly the same as that produced in V5 by division on any operand types. However, if both operands of a '/' operator have any exact numeric types, the result will be exact numeric with scale equal to the sum of the scales of the operands.

--
Dmitri Kouzmenko, www.ibase.ru, (495) 953-13-34


Ответить