http://imageshack.us/photo/my-images/839/noeuds.jpg/
Just added a link for the real table. Noeud 116 sould have INSEE_COM updated with info on 117. (116 is related as N_AMONT in 117 record)
I have this table (noueds):
NOEUD TYPE_MAT N_AMONT LONG_CABLE ADDRESS
123 REP 100 12 abc
130 AMP 229 12
173 PPP 130 1 AAA
I would like to write an UPDATE query to fill all the data ADDRESS from node after the one that has NODES.LONG_CABLE = 1.
For example:
I searched all the nodes that have LONG_CABLE = 1, gives me noeud 173; then the node before 130 should have the same address of 173.
I can search all the nodes that will be updated with:
SELECT *
FROM noeuds AS tab,
[SELECT noeuds.* FROM noeuds WHERE (((noeuds.LONG_CABLE)=" 1"))]. AS a1
WHERE (((tab.NOEUD)=([a1].[n_amont])) AND ((tab.ADDRESS)=" "));
I'm using MS Access.
EDIT:
It is updateing only onrecords selected for 1m calbe. does anyone know how to make it update on the ones pointed by noeuds.n_amont not in the selected table but on the original one called noeuds?