Wednesday, March 7, 2012

How to compare two versions of sqlserver?

HI,
I need to do an installer utility in which I have to install sql tables. In
there, I would need to check the version of sql server and add some
constraints if the sql server version is more than 8 and do alternate action
if its not.
Is there any function like version_compare()?
Thanks & Regards,
Celiamsnews wrote:
> HI,
> I need to do an installer utility in which I have to install sql tables. I
n
> there, I would need to check the version of sql server and add some
> constraints if the sql server version is more than 8 and do alternate acti
on
> if its not.
> Is there any function like version_compare()?
> Thanks & Regards,
> Celia
>
>
There isn't a "out of the box" version compare function as such. I think
you'll have to use @.@.Version or SERVERPROPERTY and then use the result
you get from here to do your evaluation.
You can look up both options in Books On Line for further info and syntax.
Regards
Steen

No comments:

Post a Comment