Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC91780 Status: Closed

"GROUP BY 1" SYNTAX IS PUSHED DOWN MSSQL INCORRECTLY

product:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problem description:
"group by 1" syntax which MSSQL does not support is pushed down 
to MSSQL incorrectly: 
 
SELECT MIN(ID1) FROM (SELECT ID1 FROM NICK1 UNION ALL SELECT ID2 
FROM NICK2) 
 
1 
----------- 
SQL1822N  Unexpected error code "42000" received from data 
source "MSSQL2008". 
Associated text and tokens are "Each GROUP BY expression must 
contain at least 
one col".  SQLSTATE=560BD 
 
 
To recreate the issue: 
 
SET PASSTHRU MSSQL2008; 
DROP TABLE TABLE1; 
DROP TABLE TABLE2; 
CREATE TABLE [TABLE1]( [ID1] [int]); 
CREATE TABLE [TABLE2]( [ID2] [int]); 
SET PASSTHRU RESET; 
 
CREATE NICKNAME NICK1 FOR "MSSQL2008"."dbo"."TABLE1"; 
CREATE NICKNAME NICK2 FOR "MSSQL2008"."dbo"."TABLE2"; 
 
SELECT MIN(ID1) FROM (SELECT ID1 FROM NICK1 UNION ALL SELECT ID2 
FROM NICK2); 
 
 
From explain, we can see following query is pushed down to 
MSSQL: 
 
RMTQTXT : (Remote statement) 
 SELECT MIN( A0."ID1") FROM "dbo"."TABLE1" A0 GROUP BY 1
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* The user is running MSSQL wrapper.                           * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to Federation Server v10.1 fp3.                      * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Solution
The problem was firstly fixed on Federation Server v10.1 fp3.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
22.04.2013
03.10.2013
03.10.2013
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.1.0.3 FixList
10.1.0.3 FixList