-- RM4_Copy_data_to_DB3_NOCASE.sql
-- 2011-12-06 ve3meo
/*
 Given a DB3 database selected as the Main database 
 with the same structure as the RM4 database
 but having empty tables and NOCASE instead of RMNOCASE
 AND the source RM4 database ATTACHed AS RM4, 
 this script will copy the rows from every table in the RM4
 source to the corresponding table in the DB3.
*/ 

BEGIN TRANSACTION;


INSERT INTO main.AddressLinkTable SELECT * FROM RM4.AddressLinkTable;

INSERT INTO main.AddressTable SELECT * FROM RM4.AddressTable;

INSERT INTO main.ChildTable SELECT * FROM RM4.ChildTable;

INSERT INTO main.CitationTable SELECT * FROM RM4.CitationTable;

INSERT INTO main.ConfigTable SELECT * FROM RM4.ConfigTable;

INSERT INTO main.EventTable SELECT * FROM RM4.EventTable;

INSERT INTO main.ExclusionTable SELECT * FROM RM4.ExclusionTable;

INSERT INTO main.FactTypeTable SELECT * FROM RM4.FactTypeTable;

INSERT INTO main.FamilyTable SELECT * FROM RM4.FamilyTable;

INSERT INTO main.GroupTable SELECT * FROM RM4.GroupTable;

INSERT INTO main.LabelTable SELECT * FROM RM4.LabelTable;

INSERT INTO main.LinkTable SELECT * FROM RM4.LinkTable;

INSERT INTO main.MediaLinkTable SELECT * FROM RM4.MediaLinkTable;

INSERT INTO main.MultimediaTable SELECT * FROM RM4.MultimediaTable;

INSERT INTO main.NameTable SELECT * FROM RM4.NameTable;

INSERT INTO main.PersonTable SELECT * FROM RM4.PersonTable;

INSERT INTO main.PlaceTable SELECT * FROM RM4.PlaceTable;

INSERT INTO main.ResearchTable SELECT * FROM RM4.ResearchTable;

INSERT INTO main.RoleTable SELECT * FROM RM4.RoleTable;

INSERT INTO main.SourceTable SELECT * FROM RM4.SourceTable;

INSERT INTO main.SourceTemplateTable SELECT * FROM RM4.SourceTemplateTable;

INSERT INTO main.WitnessTable SELECT * FROM RM4.WitnessTable;

COMMIT TRANSACTION;
