Re: Maximum UNION statements in a query
- From: "Mike Epprecht \(SQL MVP\)" <mike@xxxxxxxxxxxx>
- Date: Sat, 17 Dec 2005 08:34:38 +0100
Hi
Shoot yourself.
SQL Server 7.0, 2000 and 2005 limits are as follows:
Tables per SELECT statement: 256
So, not only will your queries perform badly, but you walk into a 256 table
limit. No matter if you have views etc, but 256 base tables is all you get.
With correct design, you could have all the data in one table and access the
data through views to enforce security.
Regards
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@xxxxxxxxxxxx
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"laurenq uantrell" <laurenquantrell@xxxxxxxxxxx> wrote in message
news:1134803057.417044.220780@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Wondering if there is a physical or realistic limitation to the number
> of UNION statements I can create in a query? I have a client with
> approx 250 tables - the data needs to be kept in seperate tables, but I
> need to be filtering them to create single results sets. Each table
> holds between 35,000 - 150,000 rows. Should I shoot myself now?
>
> lq
>
.
- Follow-Ups:
- Re: Maximum UNION statements in a query
- From: laurenq uantrell
- Re: Maximum UNION statements in a query
- References:
- Maximum UNION statements in a query
- From: laurenq uantrell
- Maximum UNION statements in a query
- Prev by Date: Maximum UNION statements in a query
- Next by Date: Re: Maximum UNION statements in a query
- Previous by thread: Maximum UNION statements in a query
- Next by thread: Re: Maximum UNION statements in a query
- Index(es):
Relevant Pages
|