General information
Category:
Coding, syntax & commands
>>>vfp 3.0
>>>
>>>hello all,
>>>
>>>ok here goes, I am trying to copy 5 fields into one large field
>>>
>>>i have tried using copy to array and then replace the one field with
>>>the array, but no luck.
>>>
>>>i seem to get the first field and that's it, any info from other remaing 4 fields is history.
>>>
>>>any thoughts???
>>>
>>>thanks and have a good day.
>>>
>>>becky
>>
>>Try REPLACE ALL field1 WITH allt(field2)+allt(field3)+allt(field4)+allt(field5)+allt(field6) because your probably doing it correctly, but that one field is not wide enough to hold the other fields contents plus the blank spaces they may have.
>
>You can simplify this using the - operator:
>
>REPLACE ALL Field1 WITH LTRIM(field2-field3-field4-field5-field6)
While not part of your original problem, you might consider putting a separator between each field. Something like
REPLACE Field1 WITH LTRIM(field2-"/"-field3-"/"-field4.....etc)
This way you could reconstruct the original fields if needed.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only