我在sql server ce中得到一个Token = with error

时间:2017-05-30 12:19:34

标签: sql-server-ce

我在sql server ce中遇到令牌=错误

with temp 
as 
(
    SELECT 
        ROW_NUMBER() over (ORDER BY BiilDate) AS Number
        ,BiilDate
        , DATENAME(dw, BiilDate) as day 
    from 
        Bill 
    where 
        BiilDate >= DATEADD(day,-7,GETDATE()) 
    AND 
        BiilDate < GETDATE() 
) 
SELECT 
    day
    , COUNT() TotalCount 
FROM 
    temp 
GROUP BY 
    day 
HAVING 
    COUNT() >= 1 
ORDER BY 
    COUNT(*) desc

1 个答案:

答案 0 :(得分:0)

Sql ce不支持CTE或row_number