Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy contents of memo field to another field

Status
Not open for further replies.

choppysuey

Technical User
Mar 28, 2001
54
US
Can anyone tell me what the easiest way is to copy the contents of a character field to a memo field in the same table? I was thinking about copying the contents of the character field into a string variable and then use a replace command to stuff it into the memo field. Seems like it's the long way of doing it. I'm using VFP 6.
 
replace all memofiled with textfield Attitude is Everything
 
choppysuey

1. If you want to add the info to the memo field:
Code:
UPDATE myTable SET myMemoField = myMemoField+myCharField

And if you want to just copy
Code:
UPDATE myTable SET myMemoField = myCharField

P.S. Carefull this will do the whole table.


Mike Gagnon
 
the posting I posted assumed that you wanted to do a replace of all the records.

if only one record is to be done you cna do as mgagnon posted or remove the all from replace

replace memofiled with textfield && at the present record

replace memofiled with textfield while condiction && will replace all records that meet the condiction Attitude is Everything
 
Danceman

if only one record is to be done you cna do as mgagnon posted

This does all records as well. Mike Gagnon
 
mgagnon
yes, you are correct. i read more into it then was posted, so use to seing condictions on an update. Attitude is Everything
 
Thanks for the posts. I wanted to do the replace on all records. The commands posted did what I wanted. One day I'll get the hang of VFP. Problem is that I don't get to work with it often enough to know the language. Thanks once again for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top