I run a query in Access to an Oracle 7.3 data base and get ORA-00960. The person in the next cubicle runs it on his PC, and does not get the error. We turn on Tracing, and my sql.log file contains:
fff9c8bb:fff9ce1b EXIT SQLExecDirect with return code -1 (SQL_ERROR)
HSTMT 0x02d113e8
UCHAR * 0x027018c0 [ -3] "SELECT "NOUN" ,"EMPAC"."EIM_NOUN_QUALIFIERS"."NOUN","EMPAC"."EIM_NOUN_QUALIFIERS"."QUAL" FROM "EMPAC"."EIM_NOUN_QUALIFIERS" ORDER BY "NOUN" \ 0"
SDWORD -3
DIAG [37000] [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00960: ambiguous column naming in select list. (960)
The sql.log file for the other person contains:
fff7799b:fff77fb3 EXIT SQLExecDirect with return code 0 (SQL_SUCCESS)
HSTMT 0x039713e8
UCHAR * 0x038718c0 [ -3] "SELECT "NOUN" ,"EMPAC"."EIM_NOUN_QUALIFIERS"."NOUN","EMPAC"."EIM_NOUN_QUALIFIERS"."QUAL" FROM "EMPAC"."EIM_NOUN_QUALIFIERS" ORDER BY "EMPAC"."EIM_NOUN_QUALIFIERS"."NOUN" \ 0"
SDWORD -3
The difference is his code generates the ORDER BY statement with a fully qualified name, whereas on my PC the name is not fully qualified.
What would cause Access to generate different code on my PC as opposed to his PC? We have run this same query on 2 other PC's, and it works on one while the other gets the same error that I do. I am on Access 97 R2, the other 3 PC's are all on Access 97 R1.
fff9c8bb:fff9ce1b EXIT SQLExecDirect with return code -1 (SQL_ERROR)
HSTMT 0x02d113e8
UCHAR * 0x027018c0 [ -3] "SELECT "NOUN" ,"EMPAC"."EIM_NOUN_QUALIFIERS"."NOUN","EMPAC"."EIM_NOUN_QUALIFIERS"."QUAL" FROM "EMPAC"."EIM_NOUN_QUALIFIERS" ORDER BY "NOUN" \ 0"
SDWORD -3
DIAG [37000] [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00960: ambiguous column naming in select list. (960)
The sql.log file for the other person contains:
fff7799b:fff77fb3 EXIT SQLExecDirect with return code 0 (SQL_SUCCESS)
HSTMT 0x039713e8
UCHAR * 0x038718c0 [ -3] "SELECT "NOUN" ,"EMPAC"."EIM_NOUN_QUALIFIERS"."NOUN","EMPAC"."EIM_NOUN_QUALIFIERS"."QUAL" FROM "EMPAC"."EIM_NOUN_QUALIFIERS" ORDER BY "EMPAC"."EIM_NOUN_QUALIFIERS"."NOUN" \ 0"
SDWORD -3
The difference is his code generates the ORDER BY statement with a fully qualified name, whereas on my PC the name is not fully qualified.
What would cause Access to generate different code on my PC as opposed to his PC? We have run this same query on 2 other PC's, and it works on one while the other gets the same error that I do. I am on Access 97 R2, the other 3 PC's are all on Access 97 R1.