Reputation: 10943
Remove the Decimal values
select cast(val as integer),val from table
and I tried round that is also not working pls tell me the way to solve this.
select ROUND(2.9,0) from dual
24 23.8331134259259
31 30.8322222222222
31 30.8321990740741
31 31.1120023148148
31 31.1119791666667
28 28.0590046296296
31 31.1177314814815
4 4.05344907407407
4 4.03957175925926
14 13.7137731481481
5 4.79490740740741
5 4.79490740740741
5 4.79489583333333
5 4.79488425925926
Expected Output :
23 23.8331134259259
30 30.8322222222222
30 30.8321990740741
30 31.1120023148148
30 31.1119791666667
28 28.0590046296296
31 31.1177314814815
4 4.05344907407407
4 4.03957175925926
13 13.7137731481481
4 4.79490740740741
4 4.79490740740741
4 4.79489583333333
4 4.79488425925926
Upvotes: 4
Views: 8582
Reputation: 239646
Are you looking for FLOOR
?
FLOOR returns the largest integer equal to or less than n. The number n can always be written as the sum of an integer k and a positive fraction f such that 0 <= f < 1 and n = k + f. The value of FLOOR is the integer k. Thus, the value of FLOOR is n itself if and only if n is precisely an integer.
Upvotes: 3