Sven Welte <[EMAIL PROTECTED]> writes:
> I'm experience some strange behaviour when casting numeric values.
This doesn't really have anything to do with casting as such. The
system thinks it can throw away the cast to NUMERIC(9,2) because the
function result is declared as already NUMERIC(9,2) ..
I'm experience some strange behaviour when casting numeric values.
Given the following SQL-Statement:
SELECT
a_int,
a_num,
CAST (a_num AS NUMERIC(9,1)) AS CastTo9_1,
CAST (a_num AS NUMERIC(9,2)) AS CastTo9_2,
CAST (a_num AS NUMERIC(9,3)) AS CastTo9_3
FROM f_numtest();
Generated output is:
a_int