Pass Through Query Error

  • Thread starter ielmrani via AccessMonster.com
  • Start date
I

ielmrani via AccessMonster.com

Hi All,
I am trying to run the following (update) pass through Query and I am getting
the following error:

ODBC-call failed
[Microsoft-ODBC SQL Server Driver][SQL Server]line1:incorrect syntax near '('.
(#170)

The code:
UPDATE (([LINK TABLE SUB FORM] INNER JOIN dbo_CLAIM_MASTERS_VS ON [LINK TABLE
SUB FORM].[Claim Number] = dbo_CLAIM_MASTERS_VS.CLAIMNO)
INNER JOIN dbo_VEND_MASTERS_VS ON dbo_CLAIM_MASTERS_VS.VENDOR =
dbo_VEND_MASTERS_VS.VENDORID SET [LINK TABLE SUB FORM].VENDID =
[dbo_VEND_MASTERS_VS]![VENDORID], [LINK TABLE SUB FORM].VENDORNM =
[dbo_VEND_MASTERS_VS]![VENDORNM], [LINK TABLE SUB FORM].STREET =
[dbo_VEND_MASTERS_VS]![STREET], [LINK TABLE SUB FORM].Street2 =
[dbo_VEND_MASTERS_VS]![STREET2], [LINK TABLE SUB FORM].CITY =
[dbo_VEND_MASTERS_VS]![CITY], [LINK TABLE SUB FORM].STATE =
[dbo_VEND_MASTERS_VS]![STATE], [LINK TABLE SUB FORM].ZIP = Left(
[dbo_VEND_MASTERS_VS]![ZIP],5);

Thanks in advance
 
D

Duane Hookom

A P-T query expects you to use the specific syntax and object names of the
database server. A P-T can't reference Access tables and objects. Normally
"dbo_" is only added when you create a link to the tables from Access. Your
server would also need to support the Left() function.

Do you really have a table on your database server named [LINK TABLE SUB
FORM]?
 
I

ielmrani via AccessMonster.com

Hi Duane,
Thanks for your reply. As you can tell I am new to SQL. Good Call: The
table is located in my database not in the server.

Duane said:
A P-T query expects you to use the specific syntax and object names of the
database server. A P-T can't reference Access tables and objects. Normally
"dbo_" is only added when you create a link to the tables from Access. Your
server would also need to support the Left() function.

Do you really have a table on your database server named [LINK TABLE SUB
FORM]?
Hi All,
I am trying to run the following (update) pass through Query and I am
[quoted text clipped - 21 lines]
Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top