Oracle translates names without double quotes to upper case. So
create table xyz(empid number, empname varchar2(20))
where everything is lower case will actually create a table XYZ
(uppercase) with a column EMPID (uppercase). Then
select empid from xyz
will succeed, because wihtout quotes "empid" and "xyz" (lowercase) get
converted to "EMPID" and "XYZ" (uppercase) which matches the way the table
is known to the data dictionary. But
select "empid" from xyz
will fail with a ORA-00904 error because "empid" (lowercase) does not
match the column name in the data dictionary which is "EMPID" (uppercase).
On your Oracle system, do this
select * from dba_tab_cols
where upper(table_name) = 'EMP';
You will probably see lower case / mixed case column names for this table.
So to query the table you must use the name as shown from the query above
and enclose it double quotes.
I've seen this issue a lot when going between databases of different
vendor. We're running into this issue between Oracle and Access.
-- Chris
Oracle LazyDBA home page