Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update query

Status
Not open for further replies.

samotek

Technical User
May 9, 2005
197
BG
i want to update the field AralCode in the table2 with the
field Aral from the table List1.However my update query is not working.Can you help?

UPDATE Table2 INNER JOIN List1 ON Table2.AralCode = List1.ARAL SET Table2.AralCode = [List1].[aral];
 
What do you mean by "is not working"? This tells us very little about what might be happening such as results or error messages.

We also don't know anything about your table structures and specifically primary keys.

Duane
Hook'D on Access
MS Access MVP
 
Code:
UPDATE Table2 SET Table2.AralCode = [List1].[aral] FROM Table2 INNER JOIN List1 ON Table2.AralCode = List1.ARAL;

Somehow, it looks like you got your SQL phrases out of position, and you're missing the Table2 in the FROM clause. Try the above, and see how it works.

But going forward, you do need to be more descriptive of your problems. For instance, you could have said, "when I run this query, I get this error code.

--

"If to err is human, then I must be some kind of human!" -Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top