日期:2014-05-17 浏览次数:20658 次
if(@TimeType=1)
begin
查询
end
else if (@TimeType = 2)
begin
查询
end
if(@Year is not null and @quarter is not null)
begin
if(@quarter =1)
begin
set @startDate =convert(datetime, @Year+'-1-1')
set @EndDate=convert(datetime, @Year+'-3-31')
end
else if(@quarter =2)
begin
set @startDate =convert(datetime, @Year+'-4-1')
set @EndDate =convert(datetime, @Year+'-6-30')
end
else if(@quarter =3)
begin
set @startDate =convert(datetime, @Year+'-7-1')
set @EndDate =convert(datetime, @Year+'-9-30')
end
else if(@quarter =4)
begin
set @startDate =convert(datetime, @Year+'-10-1')
set @EndDate =convert(datetime, @Year+'-12-31')
end
else if(@quarter =5)
begin
set @startDate =convert(datetime, @Year+'-1-1')
set @EndDate =convert(datetime, @Year+'-6-30')
end
else if(@quarter =6)
begin
set @startDate =convert(datetime, @Year+'-7-1')
set @EndDate =convert(datetime, @Year+'-12-31')
end
else if(@quarter =7)
begin
set @startDate =convert(datetime, @Year+'-1-1')
set @EndDate =convert(datetime, @Year+'-12-31')
end
end
if(@TimeType=1)
begin
查询
end
else if (@TimeType = 2)
begin
查询
end