Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Increment a number in result
Fri, Oct 4 2013 1:41 PMPermanent Link

Ben Sprei

CustomEDP

Im trying to prepare a run to print chewcks.  I need check numbers generated
withing the query as the query result progresses.  I will give the starting
number and I need it to increment automatically from there.  How can this be
done.

Example:
Select VenNum, VenName, 100,.  SUM(PayAmt) from APLines

I need this number 100 incremented for every record returned in the result
set.

TIA

Fri, Oct 4 2013 11:42 PMPermanent Link

Barry

Ben,

If each row has a unique record id, you can try:

Select VenNum, VenName, RunSum(1)+99 as CheckNum,  SUM(PayAmt) from APLines group by Rcd_Id

The only drawback is the rows returned will be ordered by Rcd_Id.

Barry
Image