• Here you go:

    DECLARE @ServerName AS NVARCHAR(50)

    SET @ServerName = <YOURSERVERNAME>

    DECLARE @SQL AS NVARCHAR(1000), @Result AS NVARCHAR(10)

    SET @SQL = 'SELECT @theResult = CAST(Result AS NVARCHAR(50)) FROM OPENQUERY([' + @ServerName + '], ' + '''' + 'SELECT SERVERPROPERTY(' + '''' + '''' + 'productversion' + '''' + '''' + ') AS Result' + '''' + ')'

    exec sp_executesql @SQL, N'@theResult NVARCHAR(50) output', @Result OUTPUT

    IF @Result <= '9.00.1399.06'

    BEGIN

    PRINT 'Yes'

    END

    ELSE

    PRINT 'No'

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn