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!

Need to have sequence number for rows based on a custom logic.

User_XY6RSNov 15 2022

I have raw data in this format:
image.png
I need to have sequences like this using Oracle SQL:
image.png
Background: Order_Release_Gid starts from LINE and goes to PORT B. This Order will be broken into 7 movement pices as:
Line to Factory Yard
Factory Yard - Factory Yard
Factory Yard - EY1
EY1 -EY1 ...etc
Please provide your sql to solve this. I am also trying and if I will get the solution will post here.

Thank You.

Comments

Post Details

Added on Nov 15 2022
9 comments
684 views