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
Please enter a title.
You can not post a blank message. Please type your message and try again.
Database Application Development
Windows and .NET
This discussion is archived
on Jan 29, 2013 12:25 PM by Tridus
Invalid UPDATE generated by Oracle .net driver - ORA-00904
Jan 29, 2013 2:11 AM
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 188.8.131.52 and 184.108.40.206.
Both have the same issue.
I have the same question
Show 0 Likes
This content has been marked as final.
Show 1 reply
Re: Invalid UPDATE generated by Oracle .net driver - ORA-00904
Jan 29, 2013 12:25 PM
in response to
What technology are you using to generate these queries?