How to get all of parent path (including itself) for a specified path on Linux or how to get all of substring (including itself) for a string on Oracle SQL?
From: Quanwen Zhao <quanwenzhao_at_gmail.com>
Date: Mon, 13 Mar 2023 13:49:43 +0800
Message-ID: <CABpiuuS=UZCREBPuFc3EfKC3Tjt+P9fSK7WK+CYGA03k35C0Ow_at_mail.gmail.com>
Hello listeners :-),
> --------------------------------------------------
> /home/oracle/arch
Date: Mon, 13 Mar 2023 13:49:43 +0800
Message-ID: <CABpiuuS=UZCREBPuFc3EfKC3Tjt+P9fSK7WK+CYGA03k35C0Ow_at_mail.gmail.com>
Hello listeners :-),
I've an requirement getting all of parent path (including itself) for a specified path on Linux or getting all of substring (including itself) for a string on Oracle SQL?
such as, the path is "/home/oracle/arch", the desired output is:
/home/oracle/arch
> /home/oracle
> /home
> /
or I've created a test table.
TEST_at_orcl>create table test1 (arch_loc varchar2(50));
> Table created.
TEST_at_orcl>insert into test1 values ('/home/oracle/arch');
> 1 row created.
TEST_at_orcl>commit;
> Commit complete.
TEST_at_orcl>select * from test1;
> --------------------------------------------------
> /home/oracle/arch
Whatever, using the SHELL or Oracle SQL to get the same output. Please help me finish it, thanks beforehand!
Best Regards
Quanwen Zhao
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Mar 13 2023 - 06:49:43 CET