• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 398
  • Last Modified:

SQL WHERE Clause Question??

Using the SQL shown below, I'm basically joining the Route tbl to the TempRouteImport tbl and updating a field called AREA.  I generally do this in VBA code and I want to use more SQL in this particular application.  The question is, should a WHERE clause be included (WHERE ROUTE.ROUTE_NUMBER = TempRouteImport.ROUTE_NUMBER) or does the join handle this???  It seems to work properly without the WHERE but I just want to make sure.  


UPDATE ROUTE INNER JOIN TempRouteImport ON ROUTE.ROUTE_NUMBER = TempRouteImport.ROUTE_NUMBER SET ROUTE.AREA = [TempRouteImport]![AREA];


Thanks,

ET
0
Eric Sherman
Asked:
Eric Sherman
  • 2
1 Solution
 
peter57rCommented:
The join is sufficient.

In sql language terms you can either use a join or you can use an equivalent where clause.  There is no need for both (although a sql command can include both a Join and a different  where clause)
0
 
Eric ShermanAccountant/DeveloperAuthor Commented:
Much appreciated peter57r.  That explains it and what I needed to confirm.

ET
0
 
Eric ShermanAccountant/DeveloperAuthor Commented:
Appreciate the quick response.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now