12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- -- 查找2013数据库中指定订单号;
- use [2013]
- declare @SearchOrder nvarchar(100)
- set @SearchOrder = '20110104-027'
- select * from client where id = @SearchOrder
- select * from dindan where id = @SearchOrder
- select * from dindanjd where id = @SearchOrder
- select * from dindansp where id = @SearchOrder
- select * from dindansp2 where id = @SearchOrder
- select * from dindansp3 where id = @SearchOrder
- select * from dindanbukuan where id = @SearchOrder
- select * from dindanbukuan2 where id = @SearchOrder
- select * from burncdreg where id = @SearchOrder
- select * from digitalwork where id = @SearchOrder
- select * from mywork where id = @SearchOrder
- select * from photoprint where id = @SearchOrder
- -----------------------------
- insert into [db].[dbo].[client] select * from [2013].[dbo].[client] where id = @SearchOrder
- insert into [db].[dbo].[dindan] select * from [2013].[dbo].[dindan] where id = @SearchOrder
- insert into [db].[dbo].[dindanjd] select * from [2013].[dbo].[dindanjd] where id = @SearchOrder
- insert into [db].[dbo].[dindansp]([id],[spid],[shuliang],[kind],[price]
- ,[name],[no],[status1],[status2],[status3]
- ,[status4],[date1],[date2],[date3],[date4],[name1]
- ,[name2],[name3],[name4],[hqdate],[hqtime],[urgent]
- ,[taketime],[no2],[status5],[status6],[date5],[date6],[name5]
- ,[name6],[growthtxname],[ps],[zs],[ren1],[ren2],[hqstatus],[bz] )
- select [id],[spid],[shuliang],[kind],[price]
- ,[name],[no],[status1],[status2],[status3]
- ,[status4],[date1],[date2],[date3],[date4],[name1]
- ,[name2],[name3],[name4],[hqdate],[hqtime],[urgent]
- ,[taketime],[no2],[status5],[status6],[date5],[date6],[name5]
- ,[name6],[growthtxname],[ps],[zs],[ren1],[ren2],[hqstatus],[bz] from [2013].[dbo].[dindansp] where id = @SearchOrder
- insert into [db].[dbo].[dindansp2] select * from [2013].[dbo].[dindansp2] where id = @SearchOrder
- insert into [db].[dbo].[dindansp3] select * from [2013].[dbo].[dindansp3] where id = @SearchOrder
- insert into [db].[dbo].[dindanbukuan]([id],[money],[ren],[date],[bz],[kind],[ren2],[item],[paytype],[jdd],[financecheck],[discount],[time])
- select [id],[money],[ren],[date],[bz],[kind],[ren2],[item],[paytype],[jdd],[financecheck],[discount],[time]
- from [2013].[dbo].[dindanbukuan] where id = @SearchOrder
- insert into [db].[dbo].[dindanbukuan2]([id],[money],[ren],[date],[bz],[kind],[ren2])
- select [id],[money],[ren],[date],[bz],[kind],[ren2]
- from [2013].[dbo].[dindanbukuan2] where id = @SearchOrder
- insert into [db].[dbo].[burncdreg] select * from [2013].[dbo].[burncdreg] where id = @SearchOrder
- insert into [db].[dbo].[digitalwork] select * from [2013].[dbo].[digitalwork] where id = @SearchOrder
- insert into [db].[dbo].[mywork] select * from [2013].[dbo].[mywork] where id = @SearchOrder
- insert into [db].[dbo].[photoprint] select * from [2013].[dbo].[photoprint] where id =@SearchOrder
|