ORA-00904: Invalid identifier

    The identifier (column name, function, ...) entered is invalid or unknown.




    It can be an unknown function, a column name that does not belong to a table, an invalid table alias, ...


    eg:

    SQL> select unknown_function from dual;
    select unknown_function from dual
    *
    ERROR at line 1:
    ORA-00904: "UNKNOWN_FUNCTION": invalid identifier

    SQL> select X1 from dual;
    select X1 from dual
    *
    ERROR at line 1:
    ORA-00904: "X1": invalid identifier


    SQL> select x.DUMMY from dual a;
    select x.DUMMY from dual a
    *
    ERROR at line 1:
    ORA-00904: "X"."DUMMY": invalid identifier


Commercial
Forum Messages
23-FEB-2008 08:06:33ora-00904anuj kumar singh Reply
FULLPACKAGENAME."CONST_1_0_YEAR1":invalid identifier is the error given by toad...m not able to get the solution....i need help.
28-MAR-2008 15:52:59ORA-00904: : invalid identifiervijaya raju Reply
I have the following table and am trying to create a unique key... different from the
existing primary key.
The primary key is made up the first 4 columns in the table
(MDB_TRANS_VENDOR_NAME,MDB_TRANS_OPCO,MDB_TRANS_VENDOR_NUM,MDB_TRANS_FACILITY)

I'm getting the "ORA-00904: : invalid identifier" error when trying to add an additional unqiue key:

i.e
SQL> l
1 ALTER TABLE mdb_trnsact_temp
2 add CONSTRAINT UNIQUE_810 (MDB_TRANS_VENDOR_NAME,
3 MDB_TRANS_OPCO,
4 MDB_TRANS_VENDOR_NUM,
5 MDB_TRANS_FACILITY,
6* MDB_TRANS_810)
SQL> /
add CONSTRAINT UNIQUE_810 (MDB_TRANS_VENDOR_NAME,
*
ERROR at line 2:
ORA-00904: : invalid identifier

The column names are correct and datatypes are all correct... what's the problem here????
Thank you in advance!!!

SQL> desc mdb_trnsact_temp
Name Null? Type
----------------------------------------- -------- ----------------------------
MDB_TRANS_VENDOR_NAME NOT NULL VARCHAR2(30)
MDB_TRANS_OPCO NOT NULL VARCHAR2(10)
MDB_TRANS_VENDOR_NUM NOT NULL VARCHAR2(15)
MDB_TRANS_FACILITY NOT NULL VARCHAR2(10)
MDB_TRANS_VERSION VARCHAR2(15)
MDB_TRANS_810 NOT NULL VARCHAR2(1)
MDB_TRANS_820 NOT NULL VARCHAR2(1)
MDB_TRANS_835 NOT NULL VARCHAR2(1)
MDB_TRANS_850 NOT NULL VARCHAR2(1)
MDB_TRANS_852 NOT NULL VARCHAR2(1)
MDB_TRANS_855 NOT NULL VARCHAR2(1)
MDB_TRANS_875 NOT NULL VARCHAR2(1)
MDB_TRANS_880 NOT NULL VARCHAR2(1)
MDB_TRANS_204 NOT NULL VARCHAR2(1)
MDB_TRANS_990 NOT NULL VARCHAR2(1)
MDB_TRANS_CC_875_VEND VARCHAR2(15)
MDB_TRANS_CC_852_VEND VARCHAR2(15)
MDB_TRANS_COMMENT VARCHAR2(50)
MDB_TRANS_ALLITEM_875 VARCHAR2(1)
MDB_TRANS_ALLITEM_852 VARCHAR2(1)
MDB_TRANS_856 VARCHAR2(1)

: ->  28-MAR-2008 15:57:13Use create unique indexDbMotive Reply
You have to use a different statement to create a unique index.


create unique index UNIQUE_810
on mdb_trnsact_temp
(MDB_TRANS_VENDOR_NAME,
MDB_TRANS_OPCO,
MDB_TRANS_VENDOR_NUM,
MDB_TRANS_FACILITY,
MDB_TRANS_810
)



: ->  28-MAR-2008 16:04:28Thank you VERY MUCH for the QUICK reply/RESOLUTION !!! vijaya raju Reply
20-APR-2008 12:12:49Invalid identifierJaikishen Reply
Hi i am creating a university online web page. I am using Oracle 10g for the database and JavaEclipse for my html and servlets.
I created my table as follows:
create table student
(
stud_id varchar(10),
stud_name varchar(20),
stud_dept varchar(10),
stud_program varchar(30),
stud_pwd varchar(30),

constraint student_pk primary key(stud_id)
)

I have a html page which accepts the user name and password and passes it to the servlet. Here it accepts the username but it says
101
st001
java.sql.SQLException: ORA-00904: "STUD_PWD": invalid identifier

Could you please help me out??
17-JUN-2008 09:02:52ora-00904RANJITH Reply
select MT.code
from
(
SELECT ood.ORGANIZATION_CODE "code",ood.ORGANIZATION_NAME,msi.segment1 "Item name1" ,
msi.description "DES1",msi1.segment1 "Item Name 2",msi1.description "DES2" --1290
FROM mtl_system_items_b msi
,mtl_system_items_b msi1
,org_organization_definitions ood
where msi.description=msi1.description
and msi.segment1!=msi1.segment1
and msi.organization_id=msi1.organization_id
and msi.ORGANIZATION_ID=ood.organization_id
--order by ood.ORGANIZATION_CODE,msi.segment1
) MT

here I am getting :ora-00904 MT.CODE INVALID IDENTIFIER.

ANY BODY CAN HELP TO FIND OUT WT IS THE REASON.

THANKS IN ADVANCE...
: ->  17-JUN-2008 12:00:32Column between double quotes is case sensitiveDbMotive Reply
Because you put code between double quotes, you explicitly make it case sensitive.
So if you want to use the column, you also have to put double quotes around it, or use no double quotes at all.


SQL> select mt.code from (select dummy "code" from dual) mt;
select mt.code from (select dummy "code" from dual) mt
*
ERROR at line 1:
ORA-00904: "MT"."CODE": invalid identifier


SQL> select mt.code from (select dummy code from dual) mt;

C
-
X

SQL> select mt."code" from (select dummy "code" from dual) mt;

c
-
X

Add your message for ORA-00904
Name:email:
Validation Code:cqtj4qt7njohf4306
Enter Code above:
Title:
State your problem: