1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| SQL> select decode (&&mon_nb, trunc (&&mon_nb), trim(to_char (&&mon_nb, '999990')), to_char (&&mon_nb, 'FM99990.99999')) from dual;
Enter value for mon_nb: 8
old 1: select decode (&&mon_nb, trunc (&&mon_nb), trim(to_char (&&mon_nb, '999990')), to_char (&&mon_nb, 'FM99990.99999')) from dual
new 1: select decode (8, trunc (8), trim(to_char (8, '999990')), to_char (8, 'FM99990.99999')) from dual
DECODE(8,TRU
------------
8
SQL> undefine mon_nb
SQL> select decode (&&mon_nb, trunc (&&mon_nb), trim(to_char (&&mon_nb, '999990')), to_char (&&mon_nb, 'FM99990.99999')) from dual;
Enter value for mon_nb: 8.060
old 1: select decode (&&mon_nb, trunc (&&mon_nb), trim(to_char (&&mon_nb, '999990')), to_char (&&mon_nb, 'FM99990.99999')) from dual
new 1: select decode (8.060, trunc (8.060), trim(to_char (8.060, '999990')), to_char (8.060, 'FM99990.99999')) from dual
DECODE(8.060
------------
8.06 |
Partager