1

I am new to MS Access, i am facing error will creating Append query.

I have linked two SQL tables and two Oracle table using System DSN for connecting the databases.

In Append query, i was using join between Oracle table and SQL table. executing the append Query and getting the following error.

Example:
I am getting this error while executing below query.

SQL Table- Linked table
Oracle Table- Linked table

Error:
ODBC -- Call failed.
[Microsoft][SQL Server Native Client 10.0][SQL Server] Invalid object name 'Oracle_2_Table'. (#208)

Query:

SELECT LC.COL2_SQL_1_table,LC.COL3_SQL_1_table,lpc.Col1_Oracle_2_table,BU.Col1_Oracle_3_table

FROM (((SQL_1_Table AS LC 
LEFT JOIN SQL_2_Table AS LP ON (LC.COL1_SQL_1_table = LP.COL1_SQL_2_table) AND (LC.COL2_SQL_1_table = LP.COL2_SQL_2_table) AND 
    (LC.COL3_SQL_1_table = LP.COL3_SQL_2_table) AND (LC.COL4_SQL_1_table = LP.COL4_SQL_2_table)) 
LEFT JOIN Oracle_1_Table AS PC ON ltrim(rtrim(LC.COL5_SQL_1_table))=ltrim(rtrim(PC.Col1_Oracle_1_table)) 
        AND LC.COL5_SQL_1_table=PC.Col4_Oracle_2_table)
LEFT JOIN Oracle_2_Table AS LPC ON lpc.Col1_Oracle_2_table=PC.Col2_Oracle_1_table)
LEFT JOIN Oracle_3_Table AS BU ON BU.Col1_Oracle_3_table = PC.Col3_Oracle_1_table

GROUP BY ...
Andre
  • 26,751
  • 7
  • 36
  • 80
Kumar
  • 11
  • 3
  • Please state the full, exact error message. And the SQL of the query you are executing. – Andre Apr 29 '17 at 10:15
  • To improve the quality of your Question, please show us the code that you have been using and the full text of the error message it produces. Some more information on the structure of the involved tables could also help. Also, please describe what research you have performed and how it was useful (if at all) and what you have been left trying to learn. Please include links to any sources you found to be of particular note. – toonice Apr 29 '17 at 16:43
  • Added the query and error. please help me on this error. ASAP.. – Kumar Apr 30 '17 at 05:01
  • You really should have added this error msg from the start. -- This should work, see e.g. http://stackoverflow.com/q/1047237/3820271 . Try it with a simple query, joining one SQL Server table with one Oracle table. Alternative: link the servers: http://stackoverflow.com/a/17796745/3820271 – Andre Apr 30 '17 at 16:42
  • i was using that query in SQL Pass through query not in APPEND Query. – Kumar May 04 '17 at 09:59

0 Answers0