tbt103,
I just ran
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.
Sorry that I can't be any clearer.
Marc