4> CREATE TABLE #VersionTable(
5> [Index] int PRIMARY KEY,
6> Name varchar(30),
7> Internal_Value int,
8> Character_Value varchar(250)
9> )
10> GO
1>
2> INSERT INTO #VersionTable
3> EXEC master..xp_msver
4>
5> DECLARE @Version int
6>
7> SELECT @Version = (SELECT Internal_Value
8> FROM #VersionTable
9> WHERE Name = 'ProductVersion')
10> IF (@Version) >= 524288
11> PRINT 'Running SS2K Beta 2 or Later'
12> ELSE
13> IF @Version >= 458752
14> PRINT 'Running 7.0 RTM or Later'
15> ELSE
16> PRINT 'Running Pre 7.0 RTM Version'
17> GO
(20 rows affected)
(20 rows affected)
Running SS2K Beta 2 or Later
1> DROP TABLE #VersionTable
2> GO
|