Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update SQL Syntax
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01135906
Message ID:
01135909
Vues:
14
This message has been marked as the solution to the initial question of the thread.
No it doesn't work. It updates Box table using a current record in the NewLocation table (w/o moving record pointer in the NewLocation table). Run your code with small modification I made to see for yourself.
The following does work
CREATE CURSOR Box (box c(10), freezer c(10))
INSERT INTO Box (box, freezer) VALUES ("1","123")
INSERT INTO Box (box, freezer) VALUES ("2","999")
INSERT INTO Box (box, freezer) VALUES ("3","999")

CREATE CURSOR NewLocation (box c(10), freezer c(10))
INSERT INTO NewLocation (box, freezer) VALUES ("2","222")
INSERT INTO NewLocation (box, freezer) VALUES ("3","333")
INSERT INTO NewLocation (box, freezer) VALUES ("1","111")
INDEX ON box TAG box

SELECT Box
UPDATE Box SET freezer = NewLocation.freezer WHERE SEEK(Box,  "NewLocation", "box")
In VFP9
UPDATE Box SET freezer = NewLocation.freezer ;
	FROM Box ;
	JOIN NewLocation ON Box.Box = NewLocation.Box
>Here you have an example (partial) that is working
>CREATE CURSOR Box (box c(10), freezer c(10))
>INSERT INTO Box (box, freezer) VALUES ("1","123")
>INSERT INTO Box (box, freezer) VALUES ("2","999")
>INSERT INTO Box (box, freezer) VALUES ("3","999")
>CREATE CURSOR NewLocation (box c(10), freezer c(10))
>INSERT INTO NewLocation (box, freezer) VALUES ("2","123")
***
SKIP
***
>SELECT Box
>UPDATE Box SET freezer = NewLocation.freezer WHERE Box = NewLocation.box
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform