I have a string with space in between, and I need to get the first string (it can be a number) before the space.
WITH test_data AS (
SELECT '123642134 10' AS quarter_cd FROM dual UNION ALL --VALID
)
select *
from test_data
where regexp_like(quarter_cd, '', 'c')
The output should be:
123642134
Substr (quarter_cd, 1,instr(quarter_cd,' ') - 1)
Should do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With