"Internal error: expression service limit has been reached. Look at potentially complex expressions in your query and try to simplify them."
Has anyone seen this before and found a good workaround?
I managed to get around this problem by dividing my SQL query into two parts essentially and writing the first SQL select query to a temporary table, and in the second part the new SQL select statement selects from the temporary table and uses a lot of CROSS APPLY to calculate cascaded computed columns.
This is an example of what the second part looks like, but I use more Cross Applys to create new columns that are calculations:
Select * from
My goal is to put this in a sql report, and it works fine if there is 1 user, only when #tempTable
is created and deleted in the same execution, and the results will be displayed correctly in the report. But in the future, if there are concurrent users, am I worried that they will write the same #tempTable
that will affect the results?
I looked at how to include this in stored procedures, but still getting the error message above.
Standage
source share