Running a 'SELECT DISTINCT' query with an ORDER BY clause and getting error
"ORA-01791: not a SELECTed expression"
Here's an example of what is being run
SELECT DISTINCT
EMPLOYEE_ID,
substr(employees.FIRST_NAME,1,3
Oracle limitation, not Toad issue
Replace ORDER BYEMPLOYEES.FIRST_NAME with column alias name or the substring expression
ORDER BY "fname" or
ORDER BY substr(employees.FIRST_NAME,1,3)
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center