Using Number Functions
Principle:
reduce number to the whole number and whole number with first two decimals and perform a comparison.
SCOTT@dev> --.01 match
32 SELECT
33 val,
34 floor(val) whole_num,
35 trunc(
36 val,
37 2
38 ) whole_num_with_dec
39 FROM
40 smple
41 WHERE
42 trunc(
43 val,
44 2
45 ) - floor(val) =0.01;
val whole_num whole_num_with_dec
0.0123 0 0.01
90.013 90 90.01
100.013 100 100.01
for the 0.01 match, I just shift the decimal to the left one digit and perform the same evaluation:
32 SELECT
33 val,
34 floor(val / 10) mod_whole_num,
35 trunc(
36 val / 10,
37 3
38 ) mod_whole_num_with_dec
39 FROM
40 smple
41 WHERE
42 trunc(
43 val / 10,
44 3
45* ) - floor(val / 10) =0.001;
val mod_whole_num whole_num_with_dec
0.0123 0 0.001
90.013 9 9.001
100.013 10 10.001