日期:2014-05-17 浏览次数:20690 次
SELECT id,convert(varchar(13),date,120),[type],count(*) FROM
(select * from barcode_2d WHERE date >= '2013-07-08 08:00:00' AND date < '2013-07-09 08:00:00'
union all
select * from barcode_2d_n WHERE date >= '2013-07-08 08:00:00' AND date < '2013-07-09 08:00:00'
union all
select * from barcode_2d_temp WHERE date >= '2013-07-08 08:00:00' AND date < '2013-07-09 08:00:00'
union all
select * from barcode_2d_sep_temp WHERE date >= '2013-07-08 08:00:00' AND date < '2013-07-09 08:00:00'
union all
select id,username,packageno,lotno,description,[type],barcode,date from barcode_2d_qr_temp WHERE date >= '2013-07-08 08:00:00' AND date < '2013-07-09 08:00:00'
union all
select id,username,packageno,lotno,description,[type],barcode,date from barcode_2d_qr WHERE date >= '2013-07-08 08:00:00' AND date < '2013-07-09 08:00:00'
union all
select id,username,packageno,lotno,description,[type],barcode,date from barcode_2d_sep WHERE date >= '2013-07-08 08:00:00' AND date < '2013-07-09 08:00:00')a
GROUP BY convert(varchar(13),date,120) ORDER BY convert(varchar(13),date,120) ASC