Alternative for percentile_cont in sql server 2008
> In Oracle it works well ......

>Query for oracle is As Follows

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

>But for SQL Server,getting error 

>Query for 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

**ERROR:Select could not be parsed correctly.Output could not be generated.

I got to know that it can work properly in sql server 2012 but need an alternative way in SQL Server 2008

Can anybody help...........
Alternative for percentile_cont in sql server 2008
===

> In Oracle it works well ......

>Query for oracle is As Follows

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

>But for SQL Server,getting error 

>Query for 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

**ERROR:Select could not be parsed correctly.Output could not be generated.

I got to know that it can work properly in sql server 2012 but need an alternative way in SQL Server 2008

Can anybody help...........