SQL Server Development

Internal Query Processor Error: The query processor could not produce a query plan

OK folks, it did happen a few days ago to get this error message: Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services. I was trying to execute the following query: SELECT * FROM dbo.tbl1WHERE tbl2ID=(SELECT id FROM dbo.tbl2 WHERE Code=’Code1′)AND tbl3ID=(SELECT…

How to retrieve size information for all the tables in a SQL Server Database

In an older post, I described how you could rebuild all the indexes of a database in SQL Server by making use of the undocumented stored procedure “sp_MSforeachtable”. Another common task is when you want to retrieve size information for all the tables in a database. Again, by using “sp_MSforeachtable“,…