On the ORACE scheduling problem

How do the results depicted in the picture, thank you

Started by Adelaide at November 22, 2016 - 2:42 AM

1, Decode
order by decode(col1,'1001',1,'1008',2,'1002',3,'1010',4,col1)
2, Instr
order by instr('1001,1008,1002,1010',col1)

Posted by Lambert at November 26, 2016 - 2:53 AM

Interesting question, this is a tree sort. You can have a look on the use of level.

Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 
Connected as OKMDB

SQL> SELECT * FROM idtest;

         A          B
---------- ----------
      1001       1008
      1002       1010
      1008       1002
      1010       1003

SQL> SELECT A, B FROM idtest t START WITH t.a = 1001 CONNECT BY PRIOR t.b = t.a;

         A          B
---------- ----------
      1001       1008
      1008       1002
      1002       1010
      1010       1003

SQL> 

Posted by Allan at December 07, 2016 - 3:27 AM

2 floor to provide complete and accurate tree classic child parent sort

Posted by Kim at December 08, 2016 - 3:53 AM

The 2 floor of the 11g? 11g not sqlplusw the tool? Looks like this?

Posted by Fitch at December 22, 2016 - 4:17 AM

PL/SQL Developer command windows.

Posted by Allan at December 26, 2016 - 5:11 AM

Study. I have the appropriate description, such as to what sort of way.

Posted by Avivahc at January 01, 2017 - 5:22 AM

nice

Posted by Edwiin at January 02, 2017 - 6:50 AM

The two floor is the solution
But also for building

Posted by Isaac at January 09, 2017 - 6:05 AM

Just started also did not think it was the tree ordering

Posted by Laurent at January 11, 2017 - 6:33 AM