Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


access query wont run.

Posted on 2012-08-24
Medium Priority
Last Modified: 2012-08-24
Acces gives an error saying a field could refer to more than one table but they are all fully referenced i think so i cannot see why it fails:
q1uestions: [AbiCurrentcodes].[EngineTypediff]
i am trying to capture change events where the field enginetypediff has changed since last month.

SELECT QryClientDifferencesLogic.[abiCode], [AbiCurrentcodes].[EngineTypediff] AS CurrentT, [AbicodesPrevious].[EngineTypediff] AS PrevT, "2012-08" AS Expr1
FROM (QryClientDifferencesLogic LEFT JOIN AbicodesPrevious ON QryClientDifferencesLogic.abiCode = AbicodesPrevious.abiCode) LEFT JOIN Abicurrentcodes ON QryClientDifferencesLogic.abiCode = Abicurrentcodes.abiCode
WHERE (((QryClientDifferencesLogic.EngineTypediff)=-1));

Open in new window

Question by:PeterBaileyUk
LVL 49

Accepted Solution

Dale Fye earned 2000 total points
ID: 38329025
Take a look at qryClientDifferencesLogic and see if it has any duplicate field names.
LVL 18

Expert Comment

ID: 38329067
Try referencing each field with its table in all occurances.
Also put table names in brackets in all instances

SELECT [QryClientDifferencesLogic].[abiCode], [AbiCurrentcodes].[EngineTypediff] AS CurrentT, [AbicodesPrevious].[EngineTypediff] AS PrevT, "2012-08" AS Expr1
FROM (QryClientDifferencesLogic LEFT JOIN AbicodesPrevious ON [QryClientDifferencesLogic].[abiCode] = [AbicodesPrevious].[abiCode]) LEFT JOIN Abicurrentcodes ON [QryClientDifferencesLogic].[abiCode] = [Abicurrentcodes].[abiCode]
WHERE ((([QryClientDifferencesLogic].[EngineTypediff])=-1));

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question