Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating one field of records from another table
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Updating one field of records from another table
Miscellaneous
Thread ID:
00581256
Message ID:
00581256
Views:
64
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
Next
Reply
Map
View

Click here to load this message in the networking platform