View previous topic :: View next topic
|
Author |
Message |
sjiraga
New User
Joined: 20 Apr 2009 Posts: 14 Location: Bangalore
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
It is very urgent please provide me the solutions ASAP. |
Your problem... not our
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|