All OS version in one function

  • Comments posted to this topic are about the item All OS version in one function

    Wilfred
    The best things in life are the simple things

  • Hi Wilfred, there is a small typo in the code; in the select ... full_windows_name from ... cte one quote ( ' ) is used instead of two ( ' ' ).

    cheers Leon

  • Very nice script. As noted in the above post, the last few lines should read:

    then windows_server_release_name + rtrim(' ' + windows_service_pack_level) + ' ' + case when left(windows_server_release_name, len(windows_product_type)) <> windows_product_type then windows_product_type else ' ' end

    else windows_home_release_name + rtrim(' ' + windows_service_pack_level) + ' ' + case when left(windows_home_release_name, len(windows_product_type)) <> windows_product_type then windows_product_type else ' ' end

    end as full_windows_name

    fromCTE

    )

    go

    Thanks again, this will be very useful.

    Jeff Bennett

    St. Louis, MO, USA

  • I already noticed the missing quote and fixed the code. However, the SQLServerCentral team first reviews every change before it's published so there's a slight delay before it's available. The correct version should be available now for download.

    Wilfred
    The best things in life are the simple things

  • NOTE: This function works with SQL2008R2 SP1 and upwards. So if you're still having an RTM version, it's time to update! :hehe:

    Wilfred
    The best things in life are the simple things

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply