When I run a query with a few no of unions I see that it gives and error:
Server: Msg 8621, Level 17, State 1, Line 1
Internal Query Processor Error: The query processor ran out of stack space during query optimization.
The query goes like this
SELECT 1,171
UNION
SELECT 1,172
UNION
SELECT 1,173
UNION
SELECT 1,174
and so on for some 1500 unions.
Does anyone have a clue on this ?
Thanks in advance for any reponses