【发布时间】:2012-02-14 12:09:25
【问题描述】:
在 Oracle 中它运行良好......
oracle的查询如下
Select distinct channel_id, position_id,datamonth,
percentile_cont(.9) within group (order by TRIM_PRE_ELIG_PAY)
over (partition by channel_id, position_id, datamonth) as TRIM_PRE_ELIG_PAY_90th_PERC
from Tablename
但是对于 SQL Server,我遇到了错误。这是 SQL Server 2008 的查询:
Select
distinct channel_id,
position_id, datamonth,
percentile_cont(.9) within group (order by TRIM_PRE_ELIG_PAY)
over (partition by channel_id) as TRIM_PRE_ELIG_PAY_90th_PERC
from table
错误:无法正确解析选择。无法输出 生成。
我知道它可以在 SQL Server 2012 中正常工作,但在 SQL Server 2008 中需要另一种方式
任何人都可以帮忙............
【问题讨论】:
标签: sql-server-2008 analytic-functions