解决方案
编写在SQL Server 2000上运行的Dynamics CRM安装的Reporting Services报表时,总是会发生这种情况。CRM具有很好的规范化数据架构,会导致大量联接。实际上有一个修补程序可以将限制从256个增加到最大260个:http://support.microsoft.com/kb/818406
最好的解决方案是识别适当的"子联接"(最好是多次使用的子联接)并将它们分解为临时表变量,然后在主联接中使用它们。它是主要的PIA,通常会降低性能。
或者创建了视图,将新视图用作引发错误的视图中查询的一部分。
SQL Server 2000中引用过多表错误:
Could not allocate ancillary table for view or function resolution. The maximum number of tables in a query (256) was exceeded.
SQL Server 2005中引用过多表错误:
Too many table names in the query. The maximum allowable is 256.
日期:2020-03-24 10:57:08 来源:oir作者:oir