Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use apex_string.split?

I'm trying to split a string : OK#15#78 by #

I would like to get the first part of the string : Ok

I tried the following queries but it's not working :

select apex_string.split('OK#15#78','#')[0] from dual;

What can I try next?

like image 828
Thomas Carlton Avatar asked Nov 04 '25 14:11

Thomas Carlton


1 Answers

You could use TABLE and rownum:

SELECT val
FROM (Select rownum AS rn, column_value AS val
     FROM TABLE(apex_string.split('OK#15#78','#')))
WHERE rn = 1;
like image 122
Lukasz Szozda Avatar answered Nov 07 '25 04:11

Lukasz Szozda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!