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

BEGIN TRANSACTION;


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

INSERT INTO main.ResearchItemTable SELECT * FROM RM5.ResearchItemTable;

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

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

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

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

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

COMMIT TRANSACTION;
