日期:2014-05-17 浏览次数:20472 次
'
select a.EXITSTATION,b.STATIONNAME,11,convert(varchar(255),'+@TollDate+')+replicate(''0'',2-datalength(cast(a.EXITDATE as varchar)))+cast(a.EXITDATE as varchar),a.RECORDTYPE,
sum(sign(a.vehicleclass^1)^1) ,
sum(sign(a.vehicleclass^2)^1) ,
sum(sign(a.vehicleclass^3)^1) ,
sum(sign(a.vehicleclass^4)^1) ,
sum(sign(a.vehicleclass^11)^1) ,
sum(sign(a.vehicleclass^12)^1) ,
sum(sign(a.vehicleclass^13)^1) ,
sum(sign(a.vehicleclass^14)^1) ,
sum(sign(a.vehicleclass^15)^1) ,
0,0,0
from '+@BaseTable+ ' AS A,BASE_STATION380 AS B'
select
vehicleclass,sum(Tolldate)
from tb group by vehicleclass