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 ...
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The simplest way would probably be to write a stored pl/sql function, however it can be done with SQL (Oracle) alone.
This will decompose the path in subpath:
We then recompose the reversed path with the
sys_connect_by_path: