[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 392
  • 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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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