Hide a column used in Order By
Solved
Malik2Livry
Posted messages
3
Status
Member
-
Malik2Livry Posted messages 3 Status Member -
Malik2Livry Posted messages 3 Status Member -
Hello everyone,
I have a little technical issue that is slightly blocking me on a query in Oracle (via SQL Developer).
I have a database (TEST) that contains 4 columns:
A: Name
B: Arrival Date
C: First Name
D: Salary
I would like to extract this database sorted by arrival date (Order by Arrival Date) but I do not want this column to be extracted.
However, when I do:
Select A, C, D
From TEST
ORDER BY B
I get the following error message:
ORA-01791: this expression is not SELECTed
01791. 00000 - "not a SELECTed expression"
Error at line 3
Of course, I do not want to use a subquery as it would make my processing heavier (in fact, my query already involves three nested queries and adding one for an 'order by' is a bit frustrating for me)
Thank you in advance :-)
Have a good day.
Malik
I have a little technical issue that is slightly blocking me on a query in Oracle (via SQL Developer).
I have a database (TEST) that contains 4 columns:
A: Name
B: Arrival Date
C: First Name
D: Salary
I would like to extract this database sorted by arrival date (Order by Arrival Date) but I do not want this column to be extracted.
However, when I do:
Select A, C, D
From TEST
ORDER BY B
I get the following error message:
ORA-01791: this expression is not SELECTed
01791. 00000 - "not a SELECTed expression"
- Cause:
- Action:
Error at line 3
Of course, I do not want to use a subquery as it would make my processing heavier (in fact, my query already involves three nested queries and adding one for an 'order by' is a bit frustrating for me)
Thank you in advance :-)
Have a good day.
Malik