Symptoms

Assume that you execute a Transact-SQL query in Microsoft SQL Server 2012. When the query contains a long case statement, the query fails. Additionally, you receive the following error:

Msg 8631, Level 17, State 1, Line 7 Internal error: Server stack limit has been reached. Please look for potentially deep nesting in your query, and try to simplify it.

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.