-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query.all on Oracle report ORA-00904: invalid identifier error #73
Comments
Unfortunately I don't have access to an Oracle environment anymore. Looking at this Stack Overflow question http://stackoverflow.com/questions/13798035/oracle-table-column-name-with-space quotes should work. It looks like you have tracing on. Can you copy and paste the SQL info SQLPlus and get it to work? |
The output SQL like this:
The SQL or SQLPLUS also will report the ORA-00904 issue. |
I just try some case, and the if the oracle table column name DOES have some spaces you must use the double quotation marks but if you don't have any spaces you MUST NOT use the them. So I suggest the code bellow: escapeColumnName: function (columnName) {
return columnName.indexOf(String.fromCharCode(32)) > 0 ? '"' + columnName + '"' : columnName;
} |
Question, I have a single word table and I am getting the same error, I know the the table is there because I run runSqlEach and it runs fine. Does case sensitivity matter? Everything in the dB is uppercase? |
Also note that the "s" in the code that takes the table name to say select from (tablename)s, the s is valid meaning if the table does not end in an s you will get table node found here is what I am finding.The name of my table is USERPROPS and if I use USERPROP I get error [Error: ORA-00904: "T0"."ID": invalid identifier]. The oracle.js is actually adding the s |
I have use the quick start code
And I will get ORA-00904: "T0"."id": invalid identifier error.
I have some review on the source code find in the ./lib/drivers/oracle.js file line 186 when the oracle driver implemented escapeColumnName function:
But the oracle will recognize the double quotation marks as usual char and not match the orignal table column name.
The text was updated successfully, but these errors were encountered: