This option of the Assist menu may be used when you want to copy the contents of a certain field in one file to a certain field in another file.
Suppose you have a file aand.dbf with the Avar (AVA) wordlist and you have a file andcez.dbf with a blank field, also AVA. If you use the Append from command here, records from aand.dbf containing the field AVA will be appended to the bottom of the Append from - but what if you have already some Append from fields filled up and want to copy the AVA field beginning from the first record?
This is possible with the Update command if your two files (aand.dbf and andcez.dbf) have some other field in common - e.g., NUMBER or WORD.
Open the andcez.dbf (containing the blank field AVA) and choose the Update option. You will first have to choose a file to update from and then be given a dialog box with the following choices:
On key (field) - name of the field common to both databases. In our case such fields are NUMBER and WORD. The key value may be also RecNo() - i.e. record number (this is not a field, but something common to all databases in general).
Scope - range of records (e.g. "10-" - all records starting with 10 or "100-200" - all records between 100 and 200). The default scope is all records of the second file (for which you do not have to enter anything).
Field to be updated - the field in your database (in our case andcez.dbf) which has to be updated from the second file. In our case this will be AVA.
Field to update from - the field in the second database (in our case aand.dbf) which must be transferred into the field AVA of andcez.dbf. In our case this will be also AVA.
This whole procedure will result in filling up the AVA field in andcez.dbf with AVA records from aand.dbf. If there is surplus information in AVA, the surplus record contents will be appended to the bottom of your andcez.dbf file.
You can also use the expression RecNo() instead of a field name (key value) while updating. If you update on RecNo(), the contents of the updating field in the second database will be transferred to the first database simply in their physical order. If you replace by RecNo() (the updated field should be numeric in this case), the updated field will be filled with record numbers of the updating file for the cases when linked fields match. This is useful for automatically interlinking different files having common fields.
The Star4Win Update command is careful: if the updatable record is not empty, the updating value does not replace it, but is added to the bottom of the file. If you wish to replace the existing record values by new ones, make sure first to REPLACE them all by empty values.