Hi,
According to this error, it seems that the execution of SQL recursive query exceed the maximum range.
To troubleshoot this problem, we could use the SQL Server Profiler 17 to capture the command that reported this error, and try to manual execute it to see the result. Then use the OPTION (MAXRECURSION 1000) increase this range to see the result.
Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.