KSM
KSM

Reputation: 262

improper inner join result

I have an update, I want to do in another table by comparing the multiple fields in two tables.

UPDATE [Route tbl]
INNER JOIN UniqueZips 
ON
 ([Route tbl].[WINDOW 5] = UniqueZips.[WINDOW 5]) AND  
 ([Route tbl].[WINDOW 3] = UniqueZips.[WINDOW 3]) AND 
 ([Route tbl].[WINDOW 4] = UniqueZips.[WINDOW 4]) AND 
 ([Route tbl].[WINDOW 2] = UniqueZips.[WINDOW 2]) AND 
 ([Route tbl].[WINDOW 1] = UniqueZips.[WINDOW 1]) 
SET 
 [Route tbl].CODE = [UniqueZips]![CODE]

The code above however does not work even when I change this to a select to see what output I get I get zero fields. How can I fix this?

Upvotes: 0

Views: 136

Answers (1)

jmacinnes
jmacinnes

Reputation: 1609

With the exception of this line,

[Route tbl].CODE = [UniqueZips]![CODE]

Which should be

[Route tbl].CODE = [UniqueZips].[CODE]

your query looks good. Are you sure that your data actually has matching rows?

Upvotes: 1

Related Questions