I have a stored procedure that is heavily using multiple level of nested dervied tables. I am just wondering what is the best method of debugging this type of queries where you can look into what is coming from the inner derived tables etc? Any thoughts?
Share
Sometimes, I’ll at least temporarily pull those derived tables out into a table variable or temp table so I can get a better look at what’s going on.
So, in an over-simplified example:
would become