Kbase P82549: Getting error 1461 when querying the oracle database if the table or field name is a reserved word.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
Status: Verified
FACT(s) (Environment):
Oracle DataServer
SYMPTOM(s):
Schema holder does not match database schema -- file X field Y. (1461)
The error is encountered when run a program that accesses the ORACLE database through the DataServer for ORACLE
The definitions in schema holder match the definitions in Oracle database
The schema is pulled from Oracle database
Oracle table and/or field has been created with a SQL reserved word using the double quote.
CAUSE:
Oracle allows creating tables or fields/columns with a reserved word if the name is specified with the double quote. In this case oracle maintains the case-sensitivity for the tables or fields names. The Oracle DataServer, by design, does not quote the tables or fields names while sending the query through OCI. Therefore, the error is apparent.
FIX:
Drop the table and recreate it with a different name either with quote when used all upper case for the table or field name or without the quotes around the table / index / column name.
For example:
CREATE TABLE "NAME" ("COLUMN1" NUMBER(2),....)
or
CREATE TABLE name (column1 NUMBER(2),....)
CAUTION: Be sure to dump the data of the ORACLE table before dropping it.
OR
create views for the tables without using double quotes.