日期:2014-05-17 浏览次数:20492 次
exec ('CREATE TABLE [dbo].['+@tb_name+'] (
[SerialNo] [numeric](18, 0) IDENTITY (1, 1) not NULL ,
[ModelName] [varchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
[BarcodeNo] [varchar] (30) COLLATE Chinese_PRC_CI_AS not NULL ,
[Station] [varchar] (5) COLLATE Chinese_PRC_CI_AS not NULL ,
[Information] [varchar] (4096) COLLATE Chinese_PRC_CI_AS not NULL ,
[Upload_Date] [datetime] default getdate() not NULL
) ON [PRIMARY]')
select * from Y2013_2 where 1=1 and BarcodeNo='CC16711214' and Station='1528' and Upload_Date >='2010-01-12' and Upload_Date <='2013-07-03' union select * from Y2013_1 where 1=1 and BarcodeNo='CC16711214' and Station='1528' and Upload_Date >='2010-01-12' and Upload_Date <='2013-07-03' order by upload_date desc
select * from Y2013_2 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2013_1 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2012_2 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2012_1 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2011_2 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2011_1 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2010_2 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2010_1 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2009_2 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2009_1 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2008_2 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2008_1 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2007_2 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS union select * from Y2007_1 where 1=1 and BarcodeNo='1234' COLLATE Chinese_PRC_CI_AS