请大侠们帮我看看下面这个语句有什么问题?
select Rdt,sHour=case
when (a.Hours-(select max(Hours) from AirRecord where Kid=a.Kid and Rdt<a.Rdt))>24
then 24+(select max(Hours) from AirRecord where Kid=a.Kid and Rdt<a.Rdt)
else a.Hours end,a.Kid
from AirRecord as a
where Kid=110
and Rdt>'2010-8-31' and a.Rdt<'2010-10-1'
and datepart(hh,a.Rdt)=7
...全文


