i was just looking through the SERVERPROPERTY functions, and cannot seem to find anything that shows the operating system.
it is buried in @@VERSION, though, so i'd expect a serverproperty to pull that part out.
the last part of string from SELECT @@VERSION that you can re-translate into something that makes sense to you:
Win7= ...on Windows NT 5.2 (Build 3790: Service Pack 2)
Server 2008 = ...on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) i think.
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!