• i was using this sql in prod environment.

    i also got the same error

    invalid length error in substring.

    i gave a try catch block inside the sp.

    why this error comes ?