Hi , I ran an sql and got this error
The SQL
if i remove one of the nested selects it will work fine.
Any one have a similar problem?
PHP Code:
Message . . . . : SQL statement too long or complex.
Cause . . . . . : The SQL statement is longer than the limit allowed for
length or complexity. The reason code is 2. One of the following reason
codes indicates the error:
1 - The total number of subselects in a fullselect (UNION or UNION ALL
clause) is greater than 32.
2 - The total number of columns, constants, and operators is greater than
the SQL limits.
The SQL
PHP Code:
SELECT t.ACVEND, t.ACITEM, t.ACLOCN, t.ACeDAT, MIN(t.ACSEQN) as
MinSeqN , MAX(t.ACSEQN) as MaxSeqN , COUNT(t.ACSEQN) as CntSeqn ,
(select acoavg from mm4r4lib/invcst b where b.acseqn = min(t.acseqn)
) as Begaco, (select acnavg from mm4r4lib/invcst e where e.acseqn =
max(t.acseqn) ) as EndAco FROM MM4R4LIB/INVCST t where t.acidat >=
1060913 GROUP BY acitem, aclocn,acvend,acedat ORDER by acitem, aclocn,
acvend, acedat
Any one have a similar problem?




Comment