Can I use Aggregate Functions In Cursor



IBM's flagship relational database management system

Can I use Aggregate Functions In Cursor

Postby prasadnaidu » Mon Aug 17, 2009 7:09 pm

Hai,

I want to use a Aggregate Function SUM in Cursor in Application Program like below

exec sql
Declare cur1 cursor for
select pol-type,sum(pol-amt) from policy
group by pol-type order by pol-type
end-exec
........
.......


plz some one help me
prasadnaidu
 
Posts: 14
Joined: Fri Aug 14, 2009 10:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Can I use Aggregate Functions In Cursor

Postby dick scherrer » Tue Aug 18, 2009 2:19 am

Hello,

It is ok to use an aggregate with a cursor, but the cursor will be read-only.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post