insert into SGGLDB_TCC..Manager_MonthReportB select * from SUBHSSEDB..Manager_MonthReportB where MonthReportId not in (select MonthReportId from SGGLDB_TCC..Manager_MonthReportB) GO insert into SGGLDB_TCC..Base_Unit(UnitId,UnitName,ShortUnitName) select UnitId,UnitName,ShortUnitName from SUBHSSEDB..Base_Unit where UnitId not in (select UnitId from SGGLDB_TCC..Base_Unit) GO insert into SGGLDB_TCC..Manager_ManhoursSortB select * from SUBHSSEDB..Manager_ManhoursSortB where MonthReportId not in (select MonthReportId from SGGLDB_TCC..Manager_ManhoursSortB) GO insert into SGGLDB_TCC..Manager_AccidentSortB select * from SUBHSSEDB..Manager_AccidentSortB where MonthReportId not in (select MonthReportId from SGGLDB_TCC..Manager_AccidentSortB) GO insert into SGGLDB_TCC..Manager_HseCostB select * from SUBHSSEDB..Manager_HseCostB where MonthReportId not in (select MonthReportId from SGGLDB_TCC..Manager_HseCostB) GO insert into SGGLDB_TCC..Manager_TrainSortB select * from SUBHSSEDB..Manager_TrainSortB where MonthReportId not in (select MonthReportId from SGGLDB_TCC..Manager_TrainSortB) GO insert into SGGLDB_TCC..Manager_MeetingSortB select * from SUBHSSEDB..Manager_MeetingSortB where MonthReportId not in (select MonthReportId from SGGLDB_TCC..Manager_MeetingSortB) GO insert into SGGLDB_TCC..Manager_CheckSortB select * from SUBHSSEDB..Manager_CheckSortB where MonthReportId not in (select MonthReportId from SGGLDB_TCC..Manager_CheckSortB) GO insert into SGGLDB_TCC..Manager_IncentiveSortB select * from SUBHSSEDB..Manager_IncentiveSortB where MonthReportId not in (select MonthReportId from SGGLDB_TCC..Manager_IncentiveSortB) GO insert into SGGLDB_TCC..Manager_AccidentDetailSortB select * from SUBHSSEDB..Manager_AccidentDetailSortB where MonthReportId not in (select MonthReportId from SGGLDB_TCC..Manager_AccidentDetailSortB) GO insert into SGGLDB_TCC..TC_CostStatisticDetail select * from SUBHSSEDB..TC_CostStatisticDetail where CostStatisticDetailId not in (select CostStatisticDetailId from SGGLDB_TCC..TC_CostStatisticDetail) GO insert into SGGLDB_TCC..Base_Project(ProjectId,ProjectCode,ProjectName,StartDate,EndDate,ShortName,ProjectState) select ProjectId,ProjectCode,ProjectName,StartDate,EndDate,ShortName,ProjectState from SUBHSSEDB..Base_Project where ProjectId not in (select ProjectId from SGGLDB_TCC..Base_Project) GO insert into SGGLDB_TCC..TC_CostStatistic select * from SUBHSSEDB..TC_CostStatistic where CostStatisticCode not in (select CostStatisticCode from SGGLDB_TCC..TC_CostStatistic) GO