Page 1 of 1

Import from CSV - merge records

PostPosted: Wed Nov 28, 2012 8:54 am
by Will_Smyth
Hi
I have an accounts database and I am extracting the customer data via CSV and importing it into handbase (windows desktop-enterprise).
Due to CSV record length restrictions I need to extract the data to two separate CSV files. I have included the Account code,primary key,
as the first field in each file.
The CSV import gives options to create a new database, import to current DB - erasing existing records and import to existing - appending to existing.
Is there any way of importing the first file and then importing the second with a merge on the primary key?

Re: Import from CSV - merge records

PostPosted: Wed Nov 28, 2012 8:57 am
by Will_Smyth
Sorry I should have said the restriction on the CSV file length is that the accounts system only allow 254 characters per line.

Re: Import from CSV - merge records

PostPosted: Wed Nov 28, 2012 9:15 am
by dhaupert
Hi there,

Thanks for your post and the additional clarification. First, one comment - the CSV format is not necessarily limited to a single line per entry. For example, if there are quotes around each field value, there can be carriage returns (new lines) in the single record. Perhaps if the account system has more than a line of records it's breaking it into multiple lines by using quotes? If so, that limitation should not pose a problem on the import.

Barring that, there is no way to do a merge into a single database table of two separate halves of entire records. You could definitely create two separate tables and use the Primary key as the key in relationship fields to pull over the other values from the second table. Then you'd see all values in one database, but couldn't change the related fields without following the relationship link to edit the record directly.

Another possibility (and probably how I'd do it) is to use Excel or OpenOffice's spreadsheet to copy the block of records from the one CSV into the cells of the other CSV. Then you'd have a single CSV file which you could then import. Seems worth this extra step to have it all as one file!