日期:2014-05-17 浏览次数:20517 次
use [product_data];
go
SELECT * INTO t2 from
(select [cInvCCode]
,'1'+[cInvCCode] as GlobalInvCCode
,[cInvCName]
,iInvCGrade
,[bInvCEnd] from
OPENDATASOURCE('sqloledb',
'server=server;uid=sa;pwd=123').ufdata_001_2010
.dbo.InventoryClass
union all
select [cInvCCode]
,'2'+[cInvCCode]
,[cInvCName]
,iInvCGrade
,[bInvCEnd] from
OPENDATASOURCE('sqloledb',
'server=server;uid=sa;pwd=123').ufdata_002_2010
.dbo.InventoryClass)a