|
Posted by pb648174 on 05/30/06 14:18
if CAST(serverproperty('ProductVersion') as varchar) not like '[1-8].%'
Erland Sommarskog wrote:
> pb648174 (google@webpaul.net) writes:
>
> > In case anyone is interested, here is the final solution we came up
> > with. It assumes the current DB is the one you want to set for snapshot
> > mania and will execute only on SQL 2005 without throwing errors on SQL
> > 2000.
> >
> > if(charindex('Microsoft SQL Server 2005',@@version) > 0)
>
> A somewhat simpler test:
>
> if serverproperty('ProductVersion') not like '[1-8].%'
>
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|