Posted 2/27/2009 1:59:46 PM
|
|
|
|
00903, 00000, "invalid table name" // *Cause: // *Action:
This is very simple ora error to tackle. Infact, the cause maybe that you tried to execute an SQL statement that included an invalid table name or the table name does not exist. Revisit your sql statement.
Sometimes when you login as sys and create a table, you don't realize it but you ended up creating a table in the sys schema. Majority of the time, you want to make sure the schema name is entered:
Example: select * from inv.customer;
In many other cases you tend to copy and paste and you didn't realize that the word from got copied too and type it in again:
SQL> select * from FROM; select * from FROM * ERROR at line 1: ORA-00903: invalid table name
Also there are ORACLE reserved words that you cannot use as a table name. Check to see if you are trying to create or select from something that doesn't exist because it's a reserved word. Here are some guidelines:
•The valid table name must be less than or equal to 30 characters.
•The table or cluster name must begin with a letter and may contain only alphanumeric characters and the special characters $, _, and #.
•The table name cannot be a reserved word.
Hope this helps.
|
|
Posted 2/27/2009 2:17:27 PM
|
|
|
|
I've seen in many cases that the DELETE command is not used properly which may lead to this error 00903, 00000, "invalid table name"
message.
Here is an example of what I mean:
SQL> delete * from CUSTOMER
where CUSTOMER_ID in (
"1B04",
"1B08",
"1C01");
delete * from CUSTOMER
*
ERROR at line 1:
ORA-00903: invalid table name
In this statement, one would think that there is nothing wrong with it. Here's the key: It's the "*"
The asterisk is not needed when you are using the DELETE statement because it deletes the entire row.
Correct way:
SQL> DELETE FROM CUSTOMER WHERE CUSTOMER_ID IN("1B04","1B08","1C01");
Thanks,
|
|
|
|