Reputation: 23
i need two decimal places for zero , now i have only number zero , should i use decimal function ? but i don't how to integrate to my previous round and sum .
round(sum(NUS),2) AS NUS
Upvotes: 1
Views: 5140
Reputation: 9904
USE TO_CHAR with corresponding format modifier to get the required output.
TO_CHAR
For more info on Number Format Models, refer here.
Select to_char(round(sum(NUMS),2), 'fm9999999.00') REQUIRED_OUTPUT from TESTDATA1;
Refer Sample Output Fiddle here:
Reputation: 159
1.00 * sum(NUS) AS NUS
will do it