473,505 Members | 14,658 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Next Sequence that's not sequential

1 New Member
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
1 828
gnawoncents
214 New Member
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

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

Similar topics

1
1971
by: Axier | last post by:
Hi, I wonder how this can happen. A "not null" field is set to "" even if a sequence should set this to next sequence number. Ok, I know it is not set to null, it is set to '' which is proven...
0
1519
by: Dan | last post by:
Hello there. I have recently been tasked with creating a mySql database. I am much more used to using Oracle, so I guess my problem is translating Oracle into mySql. My current problem is the...
4
8153
by: j | last post by:
In a footnote in the c99 standard the following is labeled as undefined: a = i; And in the second clause of section 6.5 the following is stated: "Between the previous and next sequence...
53
4010
by: Deniz Bahar | last post by:
I know the basic definition of a sequence point (point where all side effects guaranteed to be finished), but I am confused about this statement: "Between the previous and next sequence point an...
7
2060
by: akarl | last post by:
Hi all, Why do I get a warning from gcc with the following program? $ cat test.c #include <stdio.h> int f(int n) { return n;
0
1174
by: Axier | last post by:
Hi, I wonder how this can happen. A "not null" field is set to "" even if a sequence should set this to next sequence number. Ok, I know it is not set to null, it is set to '' which is proven...
7
1592
by: Kenneth Brody | last post by:
(From something brought up on "Help with array/pointer segmentation fault needed" thread.) Is "?" a sequence point? Or, more directly, is the following defined? /* Will "ptr" be guaranteed...
15
1632
by: Frederick Gotham | last post by:
Here's a sample function which converts a string to all uppercase: #include <assert.h> #include <ctype.h> void StringUp( char *p ) { do assert( *p >= 0 ); while( *p = toupper( *p ), *p++ );...
3
2503
by: Bjesparz | last post by:
I need to assign a new, sequential, Work Order number inside the WO# field of my Orders table. I also want to to have control over the number assignment using a double click button in the Order form....
5
11492
by: zgh1970 | last post by:
Hi, We have some tables with db2 generated field. How can I find the next generated sequence fot those fields. Thanks,
0
7303
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4699
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.