How would I do in a SELECT query to reverse this path :
z/y/x
for
x/y/z
where / is the delimiter and where there can be many delimiters in a single line
ex: select (... z/y/x/w/v/u ...) reversed_path from ...
You can get your result by connecting the reverted components, then reverting the resulting string again. Just make sure you strip your starting separator and put it on the other side:
SELECT '/' || REVERSE(LTRIM(SYS_CONNECT_BY_PATH(REVERSE(x), '/'), '/') AS reversed_path
...
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