Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating one table with data from another
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00490636
Message ID:
00491112
Vues:
9
Hi Eric,
This is the code I have so far:
close table all
use student in 0
use xstud in 0

select student
scan
    if seek(student.cstud_key,xstud)
        replace student.cstud_id with xstud.cstud_id
    endif
    select student
endscan
When I run it, the program errors out with "Variable 'xstud' is not found."


xstud is a table in my database. I defined a one-to-one relationship between student and xstud on cstud_key. Both tables have a primary cstud_key key and the cstud_id field. I am trying to update the student table with the value in the xstud table using a matching cstud_key.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform