[fdo-users] Merge Two SDF Files
Crispin_at_Linknode
crispin.hoult at linknode.co.uk
Mon Jun 18 06:22:28 PDT 2012
Here is the solution I used for the record:
How to: Merge Two SDF Files
===========================
Summary
=========
Export to a database, merge with SQL, export to SDF
Actions
=========
1) Export to Database
* Run FDOToolbox
* Load the two SDF files (drag 'n' drop)
* Navigate in the class in the schema
* Select right-click 'Dump to SDF/SQLite' and select the SQLite option and
a filename (for both SDF files to create two SQlite files)
2) Merge with SQL
* Run your favourite SQLite editor with a SQL prompt such as "sqliteadmin"
* Open your first SQLite file as the active database
* Start a SQL prompt and run the following commands - EDIT TO TASTE!
attach 'C:\Temp\FileA.sqlite' as toMerge;
select count(*) from TableA;
select count(*) from toMerge. TableB;
insert into TableA ([FIELDS_BUT_NOT_AUTOID]) select [FIELDS_BUT_NOT_AUTOID]
from toMerge.TableB;
select count(*) from TableA;
-- this check should be the sum of the previous two counts
3) Export to SDF
* Run FDOToolbox
* Load the new merged SQLite file (drag 'n' drop)
* Navigate in the class in the schema
* Select right-click 'Data Query' and click the 'Execute' button to query
all (may take some time)
* Validate 'Returned XXXX Results' message in status
* Select 'Save' menu then 'SDF' and choose a SDF filename to export to
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Merge-Two-SDF-Files-tp4890301p4982093.html
Sent from the FDO Users mailing list archive at Nabble.com.
More information about the fdo-users
mailing list