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!

Query Help

fameJun 26 2012 — edited Jun 26 2012
Hi all,
I have below table structure,

Direction Source_key Next_Key
------------------------------------------------------------
S - 101
N 101 102
N 102 103
N 103 104
E 104 105


Needed Query :
-----------------------------

Direction Source_key Next_Key Order
----------------------------------------------------------------------------
S - 101 1
N 101 102 2
N 102 103 3
N 103 104 4
E 104 105 5




Note :
* Direction Vlaue 'S' Order first value and 'E' order last value
* The order should be zig zag value of the source_key to next_key


Regards,
Fame
This post has been answered by BluShadow on Jun 26 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 24 2012
Added on Jun 26 2012
7 comments
97 views