Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Determine the hierarchy structure

Gor_MahiaAug 27 2024 — edited Aug 27 2024

Hi All,
I have the below table structure and below dataset, i want to determine if a record(entry) is a parent or not (see highlighted last column)

create table orders (
id number generated by default on null as identity,
Order_code varchar2(200) not null,
Seq_Number not null,
order_hierarchy varchar2(100) not null,
order_level_nbr number not null,
constraint id_pk primary key (id));

Iam trying to get the results column - any help is appreciated.

Oracle 12.2.0.1.0

thanks

This post has been answered by Stax on Aug 28 2024
Jump to Answer
Comments
Post Details
Added on Aug 27 2024
7 comments
209 views