If this is true, does anybody have any suggestions or ideas to work
around this max limit?
TIA!
Yes, since the maximum number of tables per query is 256 I would
expect that there is such a limit.
> If this is true, does anybody have any suggestions or ideas to work
> around this max limit?
How big are your tables? Would it be possible to consolidate them?
In SQL 2005 there is partioned tables, which is taking this to another
level. I don't know how many partitions you can have in a table, but
it's a new ballpark.
--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
CREATE TABLE T (X INT)
INSERT INTO T VALUES (1)
DECLARE @SQL varchar(8000)
SELECT @SQL=ISNULL(@SQL+' UNION ALL ','')+'SELECT X FROM T'
FROM (SELECT DISTINCT number FROM master..spt_values
WHERE number BETWEEN 0 AND 256) X
--PRINT LEN(@SQL)
EXEC(@SQL)
SET @SQL='CREATE VIEW V AS '+@SQL
EXEC (@SQL)
For more informations, see:
http://groups-beta.google.com/group/microsoft.public.sqlserver.programming/browse_frm/thread/7885c192f511bd1a
Razvan
Thanks Razvan. I did notice "per SELECT statement", but I was too lazy
to get a practical interpretation of what that really meant.
> For more informations, see:
> http://groups-beta.google.com/group/microsoft.public.sqlserver.programming/browse_frm/thread/7885c192f511bd1a
That's a useful link!