• I wonder if the problem comes from something like this:

    WITH VTE AS(
    SELECT *
    FROM (VALUES('1'),('1.1'),('1.1.1')) V(S))
    SELECT CONVERT(decimal(2,1),S)
    FROM VTE
    WHERE S NOT LIKE '%.%.%'
    AND CONVERT(decimal(2,1),S) > 1 ;

    This is not guaranteed to work every time and it's prone to errors as  t-sql is a declarative language and not a procedural language.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2