I've created a physical inventory database for my company that creates and manages the serialized count sheets used during the inventory process. I'm struggling with an idea for the audit log that gets generated at the very end. Rather than listing all the count sheets by number for each inventory location, I'd prefer to save space and express the the count sheets in ranges. In this way, instead of listing:
00001
00002
00003
00004
00005
00015
00016
00017
00018
I could list:
00001-00005
00015-00018
I was thinking I could save the first sheet of a range, loop through the sheet numbers and compare the last with the next until the two weren't contiguous, save the last, and repeat until all sheets for a given location were processed. One of the issues I see with this approach is having to set static variables for all the possible start/end sheet ranges...is there a way to set variables dynamically to avoid the static route?
Backing up a minute, is there a better way?
Thanks in advance?