When trying to view an item in a list which has workflows run against it, you get an error:
Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries
Problem Background
Trying to explain the exact nature of our configuration in this case would break many people’s heads. This, therefore, is a bit of a simplification.
We have a custom webpart which allows users to log an enquiry. We create an item in a list with the enquiry details, and send an email to the account responsible for dealing with those enquiries. A copy of the list item is created in another list (we’ll leave out the why and wherefore of that for now). The two copies must be kept in sync. More details on that later.