Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
GROUP BY

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: GROUP BY
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Mon Apr 22, 2013 2:52 pm    Post subject: Reply to: GROUP BY
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

Senior Member


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

PostPosted: Mon Apr 22, 2013 3:52 pm    Post subject: Re: GROUP BY
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

Site Director


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

PostPosted: Tue Apr 23, 2013 8:56 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
This topic is locked: you cannot edit posts or make replies. Limit access to certain RACF group cvnlynn CLIST & REXX 5 Wed Aug 23, 2017 2:28 am
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Need Help with : IFTHEN(WHEN=GROUP) Sumanta_89 DFSORT/ICETOOL 1 Wed Apr 19, 2017 5:23 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us