ISQL rounding
Posted in 1995
Can anyone help me with the below question? O/S: SunOS 5.3 ISQL: 4.11.UC1 ONLINE: 5.01.UD3 How come ISQL does arbitrary rounding in select statements? For example filed1 is decimal(16,4), field2 is int. select field1/field2 returns a rounded value to 2 decimal places. Even if you multiply the result by 1.0000 it still remains rounded up to 2 decimal places. BTW, the rounded up value is 0.03 but if you try select field1/field2*10000 you get 2630. But if you try select field1/field2*10000/10000 you get 0.03 again. Also select field1*1.00 produces integer format for the output but field1*"1.00" produces output to 2 decimal places. But field1*"1.000" still only produces output to 2 decimal places. Does anyone have any idea why this is or how to get around it? Jason Harris (RSWA)