>>> What I want to do is combine and copy all the records from the scars table into the Names.scars field for each name that has scars listed in the scars table. If the name has more than one scar listed I want to combine the additional scars in the same memo field for that record. Can this be done (easily)?
>>>TIA
>>>--lincoln
>>Lincoln,
>>It could be done (concatanating & copying) but could you elaborate more the part that starts with "What I want ...". I couldn't understand how fields from one table would map to other. Is location linking field ? Does names.scars have something like location1, location2.. ?
>>replace scars ;
>> with scars.txt+chr(13)+chr(10)+;
>> scars.description ;
>> in "names"
Cetin
>
>Let me try to explain. I have a table called "Scars," which is a child of a table called "Names." The "Scars" table has two fields: a text field, "Location" and a memo field, "Description." A person listed in the Names table may have more than one scar, e.g., Right Forearm -- 2" scar; Left Cheek -- 3" crescent shaped scar, etc. For reasons that are not important for this discussion, I eventually want to eliminate the Parent/Child relationship and delete the "Scars" table altogether. Instead, I want to create a memo field in the "Names" table and transfer the information currently listed in the "Scars" table to the new memo field in the corresponding records in the "Names" table. I'm just trying to get the information in the Scars.Location & Scars.Description fields to be copied into the Names.memo field. I've been partially successful using the replace, additive, etc. commands, but it one seems to copy the first matching pair (in the example above,"Right Forearm -- 2" scar" would be
>copied to the new memo field but "Left Cheek -- 3" crescent shaped scar" would not be. I'm close, but unlike Clinton, no cigar!
>
>TIA
>--lincoln
Lincoln,
Still unclear how scars related to names. Anyway I'll assume it has 3rd field as linkfld.
use names in 0
use scars in 0 order tag linkfld
select names
scan
m.linkfld = linkfld
if seek(names.linkfld, "scars","linkfld")
select scars
m.memo = ""
scan while linkfld == names.linkfld
m.memo = m.memo + ;
scars.location + chr(13) + ;
scars.description + chr(13)
endscan
select names
replace newmemo with m.memo
endif
endscan
Cetin