too many table names in the query [Resolved]

Posted by Riyazhaider under Sql Server on 11/7/2013 | Points: 10 | Views : 3212 | Status : [Member] | Replies : 2
I am writing a query when i execute it message "too many table names in the query. The maximum allowable is 256. how to resolve this.




Responses

Posted by: Bandi on: 11/7/2013 [Member] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
I think you are using SQL Server 2005...
The reasons are you might exceed the number of maximum allowed tables or the following reason
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=92360
http://devmanic.wordpress.com/2009/08/25/too-many-table-names-in-the-query-ado-net-data-services/

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Riyazhaider, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 11/7/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
The workaround for that error is
Rewrite the query
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/99503817-3583-4919-9cf4-e22f581c1674/increasing-maximum-of-tables-to-greater-than-256-?forum=sqldatabaseengine
http://stackoverflow.com/questions/2432/have-you-ever-encountered-a-query-that-sql-server-could-not-execute-because-it-r

http://www.sqlservercentral.com/articles/Dynamic+SQL/65154/

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Riyazhaider, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response