Merge
Moderator: Renato
-
- New User
- Posts: 17
- Joined: Mon Feb 29, 2016 1:17 pm
- Are you a spam bot?: No
Merge
Is there a way to merge 2 databases? I have been tracking multiple accounts across 2 different databases for a few years and would like to merge them into 1 databases with ALL the accounts... Is this possible? I tried exporting to CSV MMEX Format and then importing as CSV MMEX Format, making sure the column titles align; but still not having the result I was expecting.
-
- MVP User
- Posts: 300
- Joined: Tue Mar 02, 2021 10:24 am
- Are you a spam bot?: No
Re: Merge
One problem that you are likely facing is that CSV export & import can't correctly recreate any transfers between accounts. All CSV transactions are either deposits or withdrawals, so you end up with a separate transaction in From account and the To account. You'd have to fix this manually.
However, you can successfully export all accounts and transactions to a QIF file and then import that. This will recreate the accounts, add payees and categories as necessary, and does handle transfers.
Make sure you are using MMEX 1.6.4
Aim: To merge Database A into Database B
I would test the process using an empty database first, i.e to merge A into empty B so that you are effectively making a copy of A. It's then easier to check whether everything worked OK. Once you are happy that this works, you can do it on your real database B (keep a backup of B though!).
Steps:
1. Create empty database B using File | New Database. Set the Currency, then when you get to the page where you are asked to create accounts, just click Cancel.
2. File | Recent Files to reopen Database A
3. Go to the Dashboard (i.e so you are not viewing an account)
4. File | Export as | QIF File
- Leave Categories unticked.
- Accounts should be ticked and be shown as 'All'
- Leave From and To Date unticked
- Set the Date Format to DD-MM-YYYY
- Tick Write to File
- Click File and give it a name
- Click OK to export
5. File | Recent Files to reopen Database B
6. File | Import from | QIF File
- Browse for the .qif file
- Leave everything unticked
- Set the Date Format to DD-MM-YYYY (ignore the apparent mismatch on the Data tab, it's OK)
- Click OK to import, then Close
You should now have all your accounts and transactions from Database A, plus payees and categories that were used by those transactions.
There are a couple of extra steps that you must do:
7. Right click on each account in turn in the Navigation tree and Edit Account.
- Set the Initial Balance to be the same value as the initial balance of the account in Database A
- Set the Opening Date to be the same as in Database A (or set it to the same date or earlier than the earliest transaction date in the account)
8. Now compare the account balances against your original Database A.
I noticed a few quirks, which I will be raising as bug reports in due course:
- Loan accounts are imported as Cash accounts
- Term accounts are imported as Bank accounts
- Some spurious Categories were created with the same name as some of my accounts.
Apart from those you should be able to do the merge OK.
Please let me know in this thread if there are any problems and I will investigate further.
-
- New User
- Posts: 17
- Joined: Mon Feb 29, 2016 1:17 pm
- Are you a spam bot?: No
Re: Merge
Thanks for your detailed response. I have been playing around with it trying to get it to work and totally understand about the transfer piece (which is not ideal, but I can live with that). I might have misread it; but the steps seem to just be moving Database A to Database B. I need to merge Database A and Database B into Database C.
-
- MVP User
- Posts: 300
- Joined: Tue Mar 02, 2021 10:24 am
- Are you a spam bot?: No
Re: Merge
You did misread it
I do understand your requirement. Please re-read this (with emphasis added):
I would test the process using an empty database first, i.e to merge A into empty B so that you are effectively making a copy of A.
It's then easier to check whether everything worked OK.
Once you are happy that this works, you can do it on your real database B (keep a backup of B though!).
Exporting and importing all accounts at once via QIF is the easiest way to achieve want you want (including the handling of transfer transactions).
In terms of your A, B and C naming, I would:
- Test merging A into an empty database.
- Test merging B into an empty database.
- Make a backup of C
- Merge A into to C and then B into C