insert into SGGLDB.dbo.Training_TrainTestDB select * from SUBHSSEDB.dbo.Training_TrainTestDB
go
insert into SGGLDB.dbo.Training_TrainTestDBItem select * from SUBHSSEDB.dbo.Training_TrainTestDBItem
go
insert into SGGLDB.dbo.EduTrain_AccidentCase select * from SUBHSSEDB.dbo.EduTrain_AccidentCase
go
insert into SGGLDB.dbo.EduTrain_AccidentCaseItem select * from SUBHSSEDB.dbo.EduTrain_AccidentCaseItem
go
insert into SGGLDB.dbo.Technique_HazardListType select * from SUBHSSEDB.dbo.Technique_HazardListType
go
insert into SGGLDB.dbo.Technique_HazardList select * from SUBHSSEDB.dbo.Technique_HazardList
go
insert into SGGLDB.dbo.Hazard_HazardList (HazardListId,HazardListCode,ProjectId,VersionNo,CompileMan,CompileDate,States,WorkStage,Contents
,ControllingPerson,WorkAreaName,IdentificationDate)
select HazardListId,HazardListCode,ProjectId,VersionNo,CompileMan,CompileDate,States,WorkStage,Contents
,ControllingPerson,WorkAreaName,IdentificationDate from SUBHSSEDB.dbo.Hazard_HazardList
where ProjectId in (select ProjectId from SGGLDB.dbo.Base_Project)
go

insert into SGGLDB.dbo.Hazard_HazardSelectedItem select * from SUBHSSEDB.dbo.Hazard_HazardSelectedItem
where HazardId in (select HazardId from SGGLDB.dbo.Hazard_HazardList)
go

insert into SGGLDB.dbo.Technique_Environmental select * from SUBHSSEDB.dbo.Technique_Environmental
go
insert into SGGLDB.dbo.Hazard_EnvironmentalRiskList select * from SUBHSSEDB.dbo.Hazard_EnvironmentalRiskList
where ProjectId in (select ProjectId from SGGLDB.dbo.Base_Project)
go
insert into SGGLDB.dbo.Hazard_EnvironmentalRiskItem select * from SUBHSSEDB.dbo.Hazard_EnvironmentalRiskItem
where EnvironmentalRiskListId in (select EnvironmentalRiskListId from SGGLDB.dbo.Hazard_EnvironmentalRiskList)
go
insert into SGGLDB.dbo.Technique_Rectify select * from SUBHSSEDB.dbo.Technique_Rectify
go
insert into SGGLDB.dbo.Technique_RectifyItem select * from SUBHSSEDB.dbo.Technique_RectifyItem
go
insert into SGGLDB.dbo.Technique_CheckItemSet select * from SUBHSSEDB.dbo.Technique_CheckItemSet
go
insert into SGGLDB.dbo.Technique_CheckItemDetail select * from SUBHSSEDB.dbo.Technique_CheckItemDetail
go
insert into SGGLDB.dbo.Technique_Emergency select * from SUBHSSEDB.dbo.Technique_Emergency
where EmergencyTypeId in (select EmergencyTypeId from SGGLDB.dbo.Base_EmergencyType)
go
insert into SGGLDB.dbo.Technique_SpecialScheme select * from SUBHSSEDB.dbo.Technique_SpecialScheme
go

