?
Solved

Syntax

Posted on 2013-01-20
3
Medium Priority
?
344 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1600 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

Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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…
Suggested Courses

752 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