ORA-00904: STRING: invalid identifier tips
Oracle Error Tips by Burleson Consulting
Question: I am running
a SQL statement and I get a SQL*Plus error ORA-00904 invalid identifier.
Answer: When ORA-00904 occurs, you must enter a valid column name as it is either
missing or the one entered is invalid. The "invalid identifier" most common
happens when you are referencing an invalid alias in a select
statement. The Oracle docs note this on the ORA-00904 error:
string: invalid identifier
The column name entered is either missing or invalid.
Enter a valid column name. A valid column name must begin with a letter,
be less than or equal to 30 characters, and consist of only alphanumeric
characters and the special characters $, _, and #.
If it contains other
characters, then it must be enclosed in double quotation marks. It may
not be a reserved word.
To avoid ORA-00904, column names cannot be a reserved word, and must contain
these four criteria to be valid:
- begin with a letter
- be less than or equal to
- consist only of
alphanumeric and the special characters ($_#);
other characters need double quotation marks around them
Another important factor in correcting ORA-00904
is remembering to run catproc.sql
You can also check your trace file to find the particular error which is
causing the ORA-00904 to occur.
You can find case for review regarding error ORA-00904 at this congruent
Burleson Consulting site.