HELP with two tables and Loop question

J

Julio Hidalgo

HEllo i am having troubles doing some kind of program, i want one to check
another table for begining to end. Something like this:

While (Barcelona.ABPOBL)
While (Pueblos_temp.Pueblos_temp_1)
WHERE (((BARCELONA.ABPOBL)=(Pueblos_temp.Pueblos_temp_1)))
SET (Barcelona.PERTENECE) = 8

Want to compare the first ABPOBL with the first Pueblos_temp_1 to the last
pueblos_temp_1, then the second ABPOBL with the first pueblos_temp_1

and so on
if they are equel i wanto to set Barcelona.PErtenece to 8

how can i traduce this to Access 2003

Thanks
 
G

Graham Mandeno

Hi Julio

You should be able to do this with a simple update query with an inner join:

Update Barcelona inner join Pueblos_temp
on Barcelona.ABPOBL=Pueblos_temp.Pueblos_temp_1
Set Barcelona.PERTENECE = 8
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top