In Visual Studio 2010, while creating new projects, we may select target version to .Net Framework 2.0, .Net Framework 3.0 etc. Is there anything available in SQL Server 2008 Management Studio with the same functionality, that is the created T SQL command should run in SQL Server 2000,SQL Server 2005 etc.
For example, in SQL Server 2008, I created a procedure which uses data data type.I got error when I tried to run it in SQL Server 2005. So I changed the data type to datetime
You can do this with SQL Server 2012 Data Tools – you can target 2005, 2008, 2012, even Azure, and it will warn you when you are using syntax that is invalid for your target version. It won’t re-write it for you, though – it just uses the specified version of the SQL parser to validate the code you wrote.
SSDT is free:
http://msdn.microsoft.com/en-us/data/gg427686
I don’t think there is any way to simulate this functionality in Management Studio unless you actually execute against a 2005 instance – in which case, again, it will tell you where you’ve gone wrong, but it won’t fix your code.