Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Merging multiple records into one
Message
From
13/07/2006 10:30:46
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Merging multiple records into one
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01136022
Message ID:
01136022
Views:
53
Hi,

I have a system where a user can enter different batches of data at different times. I then need to merge the different batches together into one record based on an identifying field value.

For example, I have a table with these fields:

Field1, Field2, Field3, Field4 and Field5 (not their real names just used for the example).

Field1 is the field that identifies a particular record.

User 1 enters data in Field1, Field2 and Field3. This gets stored in one record. User 2 then enters Field1, Field4 and Field5, which gets appended to the same table as User 1's record.

I then need to go through this table and pull out all the records that have the same value in Field1 and merge them into one record. I won't know which fields have values in for each record.

Has anybody done anything similar and have any suggestions as to the best and most generic way to approach this? The part that I am seeing as being tricky is ensuring that I don't overwrite a field with an empty value.

Thanks for any help,
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Next
Reply
Map
View

Click here to load this message in the networking platform