Peckish
Peckish

Reputation: 125

Cannot figure out what is wrong with this Update Query code for MS Access

Imported a table (I DEV) from MS Excel, trying to update an MS Access table (PLA HIST). The tables have identical ID columns. I keep getting error messages from Access when I try to run it.

UPDATE PLA HIST
INNER JOIN I DEV 
ON I DEV.ID = PLA HIS.ID
SET PLA HIS.[num] = I DEV.[number];

Not sure what I'm doing wrong with this.

Upvotes: 1

Views: 31

Answers (1)

Andre
Andre

Reputation: 27634

You need to put square brackets around all identifiers that contain spaces.

UPDATE [PLA HIST]
INNER JOIN [I DEV]
ON [I DEV].ID = [PLA HIS].ID
SET [PLA HIS].[num] = [I DEV].[number];

Upvotes: 3

Related Questions