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.
Author |
Topic |
Genesis
Starting Member
6 Posts |
Posted - 2008-03-25 : 11:50:16
|
Hey guys,I apologize if this question has been posted before. I've been getting the following error"Too many table names in query. The maximum allowable is 256."I currently have 9 tables joined together, and slightly confused on what this error message is referring to. Is it referencing the total number of table names WITHIN all 9 tables? If so, is there a way to increase the capacity? Thank you for all your help! |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-03-25 : 11:52:19
|
Post the query.Table names are not only physical table names, but also derived tables etc. E 12°55'05.25"N 56°04'39.16" |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-03-25 : 11:59:25
|
.. and tables in views and views in views, etc..._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2008-03-25 : 11:59:27
|
You can't increase the capacity. It is a sql server limitation. As with all server limitations if you have reached the limit you are doing something wrong.I'm going to guess some of these 9 tables are actually views. And I'm also going to guess that your queries contain lots column values that are the result of subqueries.each reference to a table, either by way of a view, derived table, or subquery counts as a "table name" in a query. Even self joins, each instance is a new table.Post your query as well as any referenced view definitions if you want some help.Be One with the OptimizerTG |
 |
|
Genesis
Starting Member
6 Posts |
Posted - 2008-03-25 : 12:11:26
|
Thanks for the help guys! Once you guys clarified that this error what all this error encompass, I have an idea on whats wrong. TG you are right on the money... "I'm going to guess some of these 9 tables are actually views. And I'm also going to guess that your queries contain lots column values that are the result of subqueries." - TGI'm currently modifying someone else's code that left the company, and wow, this query is not pretty. (lots of mouse-wheel action lol) Thanks for the help again guys! |
 |
|
|
|
|
|
|