Technical Article

UDF to find Service Pack version

,

This UDF returns the Service Pack version

print dbo.ServicePackversion()

CREATE FUNCTION  ServicePackversion ()
RETURNS varchar(255) AS  
BEGIN 
DECLARE @Ver varchar( 255 )
select @Ver=case 
WHEN CHARINDEX ('8.00.1',@@version)>0 then 'Release'
WHEN CHARINDEX ('8.00.3',@@version)>0 then 'SP1'
WHEN CHARINDEX ('8.00.5',@@version)>0 then 'SP2'
else 'unknown'
end
RETURN (@Ver)
END

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating