Solved

Syntax

Posted on 2013-01-20
3
330 Views
Last Modified: 2013-01-20
Experts:  I get a syntax in the where condition.  I have played arond with it.   It highlights at the beginning of the Select.  thank you.

UPDATE [import-CSM2] INNER JOIN tblLetterOfCredit ON [import-CSM2].[Reference Number] = tblLetterOfCredit.LCNo SET [import-CSM2].LCID = [tblLetterOfCredit].[LetterOfCreditID]
WHERE ((([import-CSM2].[LCID]) Not In (SELECT [tblLetterOfCredit].[LCID] AND (([import-CSM2].[Actual Status])<>"GEC"));
0
Comment
Question by:pdvsa
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 400 total points
ID: 38799600
WHERE [import-CSM2].[LCID] Not In (SELECT [tblLetterOfCredit].[LCID] From [tblLetterOfCredit]) AND [import-CSM2].[Actual Status]<>"GEC";
0
 

Author Closing Comment

by:pdvsa
ID: 38799616
thanks...
0
 
LVL 61

Expert Comment

by:mbizup
ID: 38799626
Worth trying this variation as well - you might get better performance without the NOT IN/subquery:

UPDATE [import-CSM2] LEFT JOIN tblLetterOfCredit 
ON [import-CSM2].[Reference Number] = tblLetterOfCredit.LCNo 
AND [import-CSM2].[LCID] = [tblLetterOfCredit].[LCID] 
SET [import-CSM2].LCID = [tblLetterOfCredit].[LetterOfCreditID]
WHERE  [import-CSM2].[Actual Status])<>"GEC" AND  [tblLetterOfCredit].[LCID] IS NULL

Open in new window

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

685 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