Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Database Application Development
Windows and .NET
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Jan 29, 2013 6:25 AM by
Invalid UPDATE generated by Oracle .net driver - ORA-00904
Jan 28, 2013 8:11 PM
I am trying to assist our developers with this issue:
We are planning to switch from MS driver for .Net to Oracle driver for .Net,
however Oracle .net driver sometimes generates invalid UPDATE.
This is how it works: we provide SELECT statement, let's say
SELECT A, B, C FROM TABLE_A WHERE ()
Oracle executes it and returns values A=A1, B=B1, C=C1.
The driver generates UPDATE statement that has all columns in the WHERE clause:
UPDATE TABLE_A SET C=C2 WHERE A=A1, B=B1, C=C1.
It works fine.
However if SELECT statement contains expression then sometimes invalid UPDATE gets generated. In simplified form:
SELECT A+B D,C FROM TABLE_A WHERE
.Net driver generates UPDATE statement
UPDATE TABLE_A SET C=C2 WHERE A=A1, B=B1, D=D1, C=C1.
As this table doesn't have column "D" the UPDATE fails with ORA-00904 "D" invalid identifier
It could be fixed by adding AS
SELECT A+B AS D,C FROM TABLE_A WHERE
This is complex app written some time ago, our preference is to avoid changing SQL.
We tried two versions: Oracle driver for .net 126.96.36.199 and 188.8.131.52.
Both have the same issue.
This content has been marked as final.
Show 1 reply
Re: Invalid UPDATE generated by Oracle .net driver - ORA-00904
Jan 29, 2013 6:25 AM
in response to
What technology are you using to generate these queries?