Page 1 of 1

Can I use Aggregate Functions In Cursor

PostPosted: Mon Aug 17, 2009 7:09 pm
by prasadnaidu
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

Re: Can I use Aggregate Functions In Cursor

PostPosted: Tue Aug 18, 2009 2:19 am
by dick scherrer
Hello,

It is ok to use an aggregate with a cursor, but the cursor will be read-only.