patternModerate
Implications of changing compatibility mode in SQL Server from 100 to 110
Viewed 0 times
compatibilitysqlmodeimplications110100serverchangingfrom
Problem
I have a database
I was trying to execute below query to calculate percentile
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.
Please advice
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 Mydatabasebut 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
Solution
Have a look at the following link:
ALTER DATABASE Compatibility Level
Scroll down and you will see the section "Differences Between Lower Compatibility Levels and Level 110" and identify if any of these items will affect you or not. If not, then just change the level to 110.
ALTER DATABASE Compatibility Level
Scroll down and you will see the section "Differences Between Lower Compatibility Levels and Level 110" and identify if any of these items will affect you or not. If not, then just change the level to 110.
Context
StackExchange Database Administrators Q#60449, answer score: 10
Revisions (0)
No revisions yet.