BUG: Many UNIONs in One Query May Cause a 702 Error (131908)



The information in this article applies to:

  • Microsoft SQL Server 4.2x
  • Microsoft SQL Server 6.0
  • Microsoft SQL Server 6.5

This article was previously published under Q131908
BUG#: 9828 (SQLBUG_60) 16990 (SQLBUG_65)

SYMPTOMS

A query that UNIONs together many SELECT statements may fail with a 702 error.

RESOLUTION

Rephrase the query so it does not use as many UNIONS, possibly by selecting into a temp table in separate queries.

STATUS

Microsoft has confirmed this to be a problem in the products listed at the beginning of this article.

MORE INFORMATION

In the replication a SELECT from authors in pubs was UNIONed 42 times.

Modification Type:MajorLast Reviewed:11/14/2003
Keywords:kbBug kbProgramming KB131908