Solved

Syntax

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

810 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