Dette vil returnere alt efter bindestreg
SELECT SUBSTR(value, INSTR(value, '-')+1) invalue
FROM (SELECT '20-150' value FROM dual) t;
Output:
| INVALUE |
-----------
| 150 |
Og at sætte begge dele sammen
SELECT SUBSTR(value, 1, INSTR(value, '-') - 1) lvalue,
SUBSTR(value, INSTR(value, '-') + 1) rvalue
FROM (SELECT '20-150' value FROM dual) t;
Output:
| LVALUE | RVALUE |
-------------------
| 20 | 150 |