Another interesting question & replies on SSP forums lead to this post: Hi, I want to a script based on sql server version year, because some objects are not supported in 2000. We have two enviorments. something like if @@version = 'Microsoft Sqlserver 2000' --do this if @@version ='Microsoft Sqlserver 2008' -- do this ----------------------Reply On the syntax side, just remember that you can use LIKE and wildcards in any string comparison, so you could simply do: IF @@VERSION LIKE 'Microsoft...(<a href="http://sqlserver-qa.net/blogs/t-sql/archive/2010/07/20/9340.aspx">read more</a>)<img src="http://sqlserver-qa.net/aggbug.aspx?PostID=9340" width="1" height="1">