Technote (FAQ)
Question
When issuing a SELECT(*)....that contains a subselect on MS SQL Server or DB2/i nickname, why isn't the query pushed down to datasource?
An example query is:
select count(*) from
( select int1, SUM(COALESCE(int2, 0)) AS sum2, SUM(COALESCE(int3, 0)) AS sum3
from nktab1 group by int1, int2 ) A
Answer
The above query is rewritten to bring back the data and evaluate the select at the Federation Server because the GROUP BY is blocked for being pushed down. To resolve, set the server option DB2_GB_MORE_THAN_NON_AGGR to 'Y' and retry.
You can issue the following statement:
ALTER SERVER <server_name> OPTIONS( ADD DB2_GB_MORE_THAN_NON_AGGR 'Y').
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.