In the morning, the customer needs to export the full path of some records and records in the category (for example, table A is the master table, table B is the category, and a foreign key sort_id is associated with B, B In addition to the ID and parent_id), I tried a little bit and got it out. Record it:
PS: kbs_entry can be viewed as Table A mentioned above, and kbs_sort is table B.
Select Replace (replace (A. article_or_point,'s ', 'campaign'), 'A ','Article') As property, C. path as Directory,. subject as title from (select B. ID, ltrim (max (sys_connect_by_path (B. name, '->'), '->') as path from kbs_sort B connect by B. parent_id = prior B. id group by ID) C, kbs_entry A where. sort_id = C. ID and (. article_or_point = 'A' or. article_or_point ='s ')
According to the format requirements of the customer, the attribute of article_or_point = 'A' is called an article, and the attribute of S is called a promotion activity, so it looks complicated.