Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on VFP Update-SQL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Help on VFP Update-SQL
Divers
Thread ID:
00128498
Message ID:
00128498
Vues:
55
I have a problem, and don't know if it is a known bug, or misinterpretation.

Here's what I want... Update a field for all records in a first table with the value of a field in a matching table with the same id.

Ex:
Update table1;
  set txtfield1 = table2.txtfield1;
  where table1.keyid = table2.keyid
Here's the scenario to test with
Create two tables with a keyid and txtfield1
add 5 records to each with ID in each table set from 1-5
in table 1, set the values = a,b,c,d,e
in table 2, set the values = z,y,x,w,u

If table 2 is currently on record 3 (item = x), only record 3 in table 1 (item = c) will be changed to the new value (item = x).

I want the results to become
1 = z
2 = y
3 = x
4 = w
5 = u

I know that you can use views, but the process of work is being held in interim work tables that may require a full system update at a later time. Therefore, updateable views won't work for us.

Any help would be greatly appreciated...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform