Tweeted twitter.com/#!/StackDBAs/status/272324242215936000
3 Removing 'help' and 'thanks'.
source | link

I have a table (emp) with two columns in ORACLE:


COMPANY   OFFICE    EMP
------------------------
9999      00001     emp1
9999      00001     emp2
9999      00002     emp3
9999      00002     emp4
0001      99999     emp5
0001      00001     emp6
0001      00002     emp7
0002      00001     emp8
0002      99999     emp9
0003      99999     emp10
0003      00001     emp11
0003      00002     emp12


I want to get value in EMP column with following statement:
--------------
SELECT 
   EMP 
FROM 
   emp
ORDER BY COMPANY (But 9999 is first), OFFICE (But 99999 is first).
-------------
COMPANY   OFFICE    EMP
------------------------
9999      00001     emp1
9999      00001     emp2
9999      00002     emp3
9999      00002     emp4
0001      99999     emp5
0001      00001     emp6
0001      00002     emp7
0002      00001     emp8
0002      99999     emp9
0003      99999     emp10
0003      00001     emp11
0003      00002     emp12

I want to get value in EMP column with following statement:

SELECT 
   EMP 
FROM 
   emp
ORDER BY COMPANY /*(But 9999 is first)*/, OFFICE /*(But 99999 is first).*/

I don't know how to do.

I have a table (emp) with two columns in ORACLE:


COMPANY   OFFICE    EMP
------------------------
9999      00001     emp1
9999      00001     emp2
9999      00002     emp3
9999      00002     emp4
0001      99999     emp5
0001      00001     emp6
0001      00002     emp7
0002      00001     emp8
0002      99999     emp9
0003      99999     emp10
0003      00001     emp11
0003      00002     emp12


I want to get value in EMP column with following statement:
--------------
SELECT 
   EMP 
FROM 
   emp
ORDER BY COMPANY (But 9999 is first), OFFICE (But 99999 is first).
-------------

I don't know how to do.

I have a table (emp) with two columns in ORACLE:

COMPANY   OFFICE    EMP
------------------------
9999      00001     emp1
9999      00001     emp2
9999      00002     emp3
9999      00002     emp4
0001      99999     emp5
0001      00001     emp6
0001      00002     emp7
0002      00001     emp8
0002      99999     emp9
0003      99999     emp10
0003      00001     emp11
0003      00002     emp12

I want to get value in EMP column with following statement:

SELECT 
   EMP 
FROM 
   emp
ORDER BY COMPANY /*(But 9999 is first)*/, OFFICE /*(But 99999 is first).*/

I don't know how to do.

2 Removing 'help' and 'thanks'.
source | link

I have a table (emp) with two columns in ORACLE:

COMPANY   OFFICE    EMP
------------------------
9999      00001     emp1
9999      00001     emp2
9999      00002     emp3
9999      00002     emp4
0001      99999     emp5
0001      00001     emp6
0001      00002     emp7
0002      00001     emp8
0002      99999     emp9
0003      99999     emp10
0003      00001     emp11
0003      00002     emp12


I want to get value in EMP column with following statement:
--------------
SELECT 
   EMP 
FROM 
   emp
ORDER BY COMPANY (But 9999 is first), OFFICE (But 99999 is first).
-------------

I don't know how to do. Please help me do this. Thank in advance!

I have a table (emp) with two columns in ORACLE:

COMPANY   OFFICE    EMP
------------------------
9999      00001     emp1
9999      00001     emp2
9999      00002     emp3
9999      00002     emp4
0001      99999     emp5
0001      00001     emp6
0001      00002     emp7
0002      00001     emp8
0002      99999     emp9
0003      99999     emp10
0003      00001     emp11
0003      00002     emp12


I want to get value in EMP column with following statement:
--------------
SELECT 
   EMP 
FROM 
   emp
ORDER BY COMPANY (But 9999 is first), OFFICE (But 99999 is first).
-------------

I don't know how to do. Please help me do this. Thank in advance!

I have a table (emp) with two columns in ORACLE:

COMPANY   OFFICE    EMP
------------------------
9999      00001     emp1
9999      00001     emp2
9999      00002     emp3
9999      00002     emp4
0001      99999     emp5
0001      00001     emp6
0001      00002     emp7
0002      00001     emp8
0002      99999     emp9
0003      99999     emp10
0003      00001     emp11
0003      00002     emp12


I want to get value in EMP column with following statement:
--------------
SELECT 
   EMP 
FROM 
   emp
ORDER BY COMPANY (But 9999 is first), OFFICE (But 99999 is first).
-------------

I don't know how to do.

1
source | link

Special Oracle Order

I have a table (emp) with two columns in ORACLE:

COMPANY   OFFICE    EMP
------------------------
9999      00001     emp1
9999      00001     emp2
9999      00002     emp3
9999      00002     emp4
0001      99999     emp5
0001      00001     emp6
0001      00002     emp7
0002      00001     emp8
0002      99999     emp9
0003      99999     emp10
0003      00001     emp11
0003      00002     emp12


I want to get value in EMP column with following statement:
--------------
SELECT 
   EMP 
FROM 
   emp
ORDER BY COMPANY (But 9999 is first), OFFICE (But 99999 is first).
-------------

I don't know how to do. Please help me do this. Thank in advance!