COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: actcognosuser on 10 Feb 2010 07:59:46 AM

Title: Statement too long or complex!!!-Help
Post by: actcognosuser on 10 Feb 2010 07:59:46 AM
Hi all,

I have a union with six subqueries.This is the error I receive when I execute the query

UDA-SQL-0107 A general exception has occurred during the operation "prepare".
[IBM][CLI Driver][DB2/6000] SQL0101N  The statement is too long or too complex.  SQLSTATE=54001.

Initially it was a much bigger query.i tried to bring it down to 6.I still get this statement complex error.The tables i use are not too big.The query has about
35 fields.Is that what is making it complex?

How do i resolve this issue?
Title: Re: Statement too long or complex!!!-Help
Post by: blom0344 on 11 Feb 2010 11:27:16 AM
This is not really a Cognos issue. The problem is with DB2/6000 and the SQL complexity involved. A possible approach is to simplify step by step untill the query executes and then take it's definition to a DBA for advice.