--1.[singleincome]
--将2014中的singleincome记录插入回db数据库中;
set IDENTITY_INSERT [db].[dbo].[singleincome] ON
insert into [db].[dbo].[singleincome]
		   ([id]
		   ,[name]
           ,[money]
           ,[dat]
           ,[bz]
           ,[renyuan1]
           ,[renyuan2]
           ,[renyuan3]
           ,[sale2type]
           ,[paytype]
           ,[phone]
           ,[payed]
           ,[balance]
           ,[pinyin]
           ,[financecheck]
           ,[count]
           ,[time]
		   ,[jdd]) select * from [2014].[dbo].[singleincome]
where not exists(select id from [db].[dbo].[singleincome] where [db].[dbo].[singleincome].[id] = [2014].[dbo].[singleincome].[id])
set IDENTITY_INSERT [db].[dbo].[singleincome] OFF

--2.[singleincomemoney]
--将2014中的singleincomemoney记录插入回db数据库中;
insert into [db].[dbo].[singleincomemoney]([id],[money],[date],[clerk],[paytype],[financecheck],[time],[jdd]) 
select [id],[money],[date],[clerk],[paytype],[financecheck],[time],[jdd] 
from [2014].[dbo].[singleincomemoney] 
where not exists(select id from [db].[dbo].[singleincomemoney] where [db].[dbo].[singleincomemoney].[id] = [2014].[dbo].[singleincomemoney].[id])

