Using the “Get Plan” for a complex SQL, the following error is returned:
"Index and length must refer to a location within the string"
"Parameter name: length"
The error only happens on a complex query.
This does not error on a simple query..