Thanks Greg. Do you know if there is a limitation on the number of UNION ALL in a query? I found a post that said 16 was the Limit. However I have not been able to confirm that for the latest version of DB2. Thanks again.
SELECT IBMREQD
FROM "SYSIBM".SYSDUMMY1
UNION ALL
repeated n times
in my v8 QMF. Started off with 16 UNION ALLs and kept going until it didn't like it any more. It got up to 512 ok, but on 513 it gave me the error:
"Your query is too long or too complex."
It may be that 512 is NOT the limit of UNION ALL, but just that the number of characters in the SQL statement is too many. I know that in the past I have had a problem with very large SQL statements giving this sort of error.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.