• You need the option

    Must declare the scalar variable "@Dec".

    When running on a Case Sensitive collation.

    Once that select statement on line 2 is adjusted then it would work.

    ------

    Robert