日期:2014-05-17 浏览次数:20440 次
declare @sql varchar(1000)
declare @startHH int
declare @endHH int
set @startHH = 1
set @endHH = 2
set @sql = ''
print @startHH
print @endHH
Select @sql = @sql + ' and datepart(hh, ATable.insertTime) between '+''''+ @startHH + '''' + ' and ' +''''+ @endHH + ''''
declare @sql varchar(1000)
declare @startHH int
declare @endHH int
set @startHH = 1
set @endHH = 2
set @sql = ''
print @startHH
print @endHH
Select @sql = @sql + ' and datepart(hh, ATable.insertTime) between '+''''
+ str(@startHH) + '''' + ' and '
+''''+ str(@endHH) + ''''