Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
Increment a number in result |
Fri, Oct 4 2013 1:41 PM | Permanent 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 PM | Permanent 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 |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |