ORA-00904: Invalid identifier
 Forum Messages
| FULLPACKAGENAME."CONST_1_0_YEAR1":invalid identifier is the error given by toad...m not able to get the solution....i need help. |
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:13 | Use create unique index | DbMotive | 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:28 | Thank you VERY MUCH for the QUICK reply/RESOLUTION !!! | vijaya raju | 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?? |
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:32 | Column between double quotes is case sensitive | DbMotive | 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
|