This is the first in a series of blurbs on common Oracle errors. Enjoy!
Most people get ORA-00904 because they forgot to put quotes around a literal string in their SQL.
Example:
[code language=”sql”]SQL> select foo from dual;
select foo from dual
*
ERROR at line 1:
ORA-00904: "FOO": invalid identifier
SQL> select ‘foo’ from dual;
‘FOO’
——————————–
foo
[/code]
Other causes of this error may include:
- No privileges on the object in question
- the object or column is misspelled
- There is no private or public synonym, so the object must be called using a fully-qualified name (SCOTT.EMP vs. EMP)