The 'replace into' statement is not suitable for this purpose because its effect depends on which key the table has in the target database. If this key differs from a manually defined one (especially if it does not exist), the result is incorrect.
Instead, I changed the way how the 'upsert' statements are generated to include multiple rows per statement. This makes the script more compact.
Last edit: Ralf Wisser 2019-08-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The 'replace into' statement is not suitable for this purpose because its effect depends on which key the table has in the target database. If this key differs from a manually defined one (especially if it does not exist), the result is incorrect.
Instead, I changed the way how the 'upsert' statements are generated to include multiple rows per statement. This makes the script more compact.
Last edit: Ralf Wisser 2019-08-19