I know this is a relatively simple question, but I couldn't find anything with my keywords using Google. I am referencing with a SQL (Oracle) to a column that has numbers like that:
Now I need to remove the last 2 zeros. This approach is not working:
Trim(TRAILING '00' FROM F0035.Nr) "Sequence",
Does anyone have any idea?
The result should be a column with numbers - not a text
See these two options:
SQL> with test (col) as
2 (select '100' from dual union all
3 select '12500' from dual union all
4 select '300' from dual
5 )
6 select col,
7 to_number(substr(col, 1, length(col) - 2)) result_1,
8 to_number(col) / 100 result_2
9 from test;
COL RESULT_1 RESULT_2
----- ---------- ----------
100 1 1
12500 125 125
300 3 3
SQL>
00
)100