Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Error - select statement or table limitation

Author  Topic 

rushdib
Yak Posting Veteran

93 Posts

Posted - 2004-02-12 : 09:53:10
Hi,
I am getting the following error:

"Could not allocate ancillary table for view or function resolution. The maximum number of tables in a query (256) was exceeded."

We have a report which uses about 50 functions (returns tables) to calculate various parts of the components. There are functions inside functions (like sub queries). The main functions are connected inside a stored proc which populates a table with the results so that the report can be run in Access 2000.
I am testing this in MSDE 2000, so I don't know whether the limitation is due to that.

Thank you,

Rushdi

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-02-12 : 19:14:32
The limitation is for SQL Server as well. I can't even imagine what kind of performance that you would get if it allowed more than 256 tables. More than 50 tables is absurd.

Tara
Go to Top of Page

rushdib
Yak Posting Veteran

93 Posts

Posted - 2004-02-12 : 20:43:47
Tara, it's a monster report where there so many calculations. It's hard code that report using few queries.
I am thinking of using temp tables to store data rather than running a function for every calculation. This would decrease the select statements.
Go to Top of Page
   

- Advertisement -