ORA-00904: invalid identifier newbie, valid field is 'invalid'
775094May 25 2010 — edited May 25 2010Why can't I use the sha field (it is primary key)? Here I insert a record, and then select it, says my field is invalid? Its not!
Database has 1 billion entires in it...
SQL> describe hash_table;
Name Null? Type
----------------------------------------- -------- ----------------------------
sha NOT NULL VARCHAR2(64)
file_name NOT NULL VARCHAR2(20 CHAR)
offset BINARY_DOUBLE
length NUMBER(38)
ref_count NUMBER(38)
SQL> insert into hash_table values('3','/zpool1/data2/1',10,4096,1);
1 row created.
SQL> select * from hash_table where sha = '3';
select * from hash_table where sha = '3'
*
ERROR at line 1:
ORA-00904: "SHA": invalid identifier
SQL> select * from hash_table where sha = 3;
select * from hash_table where sha = 3
*
ERROR at line 1:
ORA-00904: "SHA": invalid identifier
SQL> select * from hash_table where 'sha' = 3;
select * from hash_table where 'sha' = 3
*
ERROR at line 1:
ORA-01722: invalid number
SQL> select * from hash_table where 'sha' = '3';
no rows selected
Edited by: user12613973 on May 25, 2010 8:12 AM