如何按時間分組?我想這一點,但它給錯誤「無效列名‘時間’。」:如何在SQL中對我的列進行分組?
select Count(Page) as VisitingCount, CONVERT(VARCHAR(5), Date, 108) as [Time]
from scr_SecuristLog
where Date between '2009-05-04 00:00:00' and '2009-05-06 14:58'
and [user] in (select USERNAME from scr_CustomerAuthorities)
group by [Time] order by [VisitingCount] asc
列時間不存在的錯誤?我認爲你需要按日期轉換而不是名稱[時間] – u07ch 2009-05-04 14:10:09
但我需要時間組? – Penguen 2009-05-04 14:12:01
猜猜我需要學會打字速度較慢,如果後面相同的答案會被接受; – 2009-05-04 14:33:41