I have a database Mydatabase
created in SQL Server 2008 R2. I have upgraded to SQL Server 2012.
I was trying to execute below query to calculate percentile
select Distinct [KEY],PERCENTILE_CONT(0.25) within group(order by EachPrice)
OVER(Partition By [KEY]) As Q1,PERCENTILE_CONT(0.50) within group(order by EachPrice)
OVER(Partition By [KEY]) As Q2,
PERCENTILE_CONT(0.75) within group(order by EachPrice)
OVER(Partition By [KEY]) As Q3,
PERCENTILE_CONT(1) within group(order by EachPrice)
OVER(Partition By [KEY]) As Q4
from Mydatabase
but I am getting an error stating that
Msg 10762, Level 15, State 1, Line 1
The PERCENTILE_CONT function is not allowed in the current compatibility mode. It is only allowed in 110 mode or higher.
- Can I change compatibility mode to 110?
- What are the implications of changing compatibility mode from 100 to 110?
Please advice
compatibility_level
is still at 100. Fantastic!