I have SQL server 2014 running on my computer and a database that has a
compatibility_level of 100 (SQL Server 2008). I thought that that would be sufficient for writing queries in SSMS that only work for SQL Server versions 2008 and lower but for some reason SSMS runs queries that use
OVER (PARTITION BY ...) clauses (with the BETWEEN argument) which are only for 2012 and up.
Our software needs to be compatible with 2008 R2 and up. Is there a setting that I can change that will cause my queries to fail in SSMS if I write a query that is not compatible with 2008 R2?