Solved

Syntax

Posted on 2013-01-20
3
307 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 119

Accepted Solution

by:
Rey Obrero 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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 …

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now