The default maximum number of decimal digits for an expression is based on dbscontrol General field 13: MaxDecimal
When you submit a
sel type(400.000000000 * 100000000)
you'll probably get dec(15,9) or dec(18,9).
The best solution would be changing MaxDecimal to 38, but this has do be done by your DBA after checking for possible side-effects for existing applications (and it requires a restart). On the other hand this is usually safe, when a query/application encountered this error it's already doing a workaround:
sel cast(400.000000000 as decimal(38,8)) * 100000000;
The default maximum number of decimal digits for an expression is based on dbscontrol General field 13: MaxDecimal
When you submit a
sel type(400.000000000 * 100000000)
you'll probably get dec(15,9) or dec(18,9).
The best solution would be changing MaxDecimal to 38, but this has do be done by your DBA after checking for possible side-effects for existing applications (and it requires a restart). On the other hand this is usually safe, when a query/application encountered this error it's already doing a workaround:
sel cast(400.000000000 as decimal(38,8)) * 100000000;
Dieter