By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,660 Members | 1,939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,660 IT Pros & Developers. It's quick & easy.

Next Sequence that's not sequential

P: 1
I have a Work Order sequence table.
A completed sequence is represented by 90. I want to find the next sequence in the string that has been completed. I originally did a min based on the sequence where completed was <>90. Which would have been fine if the system was updating the records. As you can see below, sequence 10 did not get completed in the system. However, could not have completed sequence 20 or 30 or 40 if 10 was not done. So, my min formula returned a value of 10. I need my value to return a value of 50. Any thoughts?

WO Sequence Complete MaxSequence Compete
1234 10 40
1234 20 90 40
1234 30 90 40
1234 40 90 40
1234 50 40
Feb 15 '17 #1
Share this Question
Share on Google+
1 Reply

P: 214
I've read this a couple times and think I know what you're asking, but am not sure how your data is organized. Could you provide a little more info and possibly another example?

Also, it sounds like the root of the problem is that the database allows a user to mark a sequence complete before a prior sequence is marked complete. I would make sure to fix that, for starters.
Feb 16 '17 #2

Post your reply

Sign in to post your reply or Sign up for a free account.