I am trying to have around 6290 'AND' conditions in this query. I get the same for around 11945 'OR' conditions.
Exception details: The server encountered a stack overflow during compile time. at System.Data. lClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException excepti , Boolean breakConnection)