Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy five fields to one
Message
From
03/03/2000 17:57:28
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00340892
Message ID:
00341554
Views:
26
>>>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
Map
View

Click here to load this message in the networking platform