IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

GROUP BY


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sjiraga

New User


Joined: 20 Apr 2009
Posts: 14
Location: Bangalore

PostPosted: Mon Apr 22, 2013 2:47 pm
Reply with quote

In one of my PLI-DB2 Program. GROUP BY is using.
As per new DB2 versions, application program is not supporting GROUP BY clause. Our current requirement is need to remove GROUP BY clause without effecting existing logic. Here below I have mentioned my logic and any one please provide me the alternate solution for this.

SELECT PIN, SUM(INTRO_AMT_APLD_GRS)
FROM DRBILLV
WHERE CHGDATE = :WK_CCYYMM AND
SERVICE_NAME = 'CCMAIL'
GROUP BY PIN;

It is very urgent please provide me the solutions ASAP.

Emphasis removed from Subject line
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10771
Location: italy

PostPosted: Mon Apr 22, 2013 2:52 pm
Reply with quote

Quote:
It is very urgent please provide me the solutions ASAP.


Your problem... not our icon_evil.gif

use a cursor and do the sum yourself by <hand>

remember that
replying is on voluntary base and our time availability
if You have time constraints a forum is not the best place to ask for help
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Apr 22, 2013 3:52 pm
Reply with quote

These two statements
sjiraga wrote:
As per new DB2 versions, application program is not supporting GROUP BY clause.
and
Quote:
Our current requirement is need to remove GROUP BY clause without effecting existing logic.
are contradicting.

For the former, IBM should be worried and you should open a ticket with IBM. Also, when you say,"As per new DB2 versions, application program is not supporting GROUP BY clause" -- how exactly it is not supported? What error message do you get and what release of DB2 you are at?

If later, then that's a programmer choice and you should follow the advice from Enrico.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19245
Location: Inside the Matrix

PostPosted: Tue Apr 23, 2013 8:56 pm
Reply with quote

Hello,

Quote:
As per new DB2 versions, application program is not supporting GROUP BY clause.
Err, ahhh, ummm - Yes it Does support GROUP BY.

Why does someone believe GROUP BY is not supported?

Is there some reason the code does not specify ORDER BY PIN also?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Hexadecimal Group compare and write t... DFSORT/ICETOOL 5
No new posts DB2 group member usage DB2 0
No new posts Group comparison/update between two f... DFSORT/ICETOOL 10
No new posts Group selective VB records - Trailer ... DFSORT/ICETOOL 16
No new posts Include Group record based on detail ... DFSORT/ICETOOL 11
Search our Forums:

Back to Top