Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Updating one field of records from another table
I get the following code to work except it to creates a new record in tableB, but I want it to insert (or is it update?) the values of tableA.fieldtotal into tableB.fieldtotal if the name of the person and the dates are the same in both tables. Presently the following code adds a new record to tableB with all the fields blank except for fieldtotal.
Select tableA.fieldA as fieldtotal ;
FROM tableA ;
INNER JOIN tableB ON tableA.fieldpersonname = tableB.fieldpersonname ;
AND tableA.somedate = tableB.somedate ;
INTO cursor crsTemp
SELECT tableB
append from ( dbf('crsTemp') )
Please help me correct this to change the fieldtotal for a specific date and person.
Thank you
Max
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement