Check Sequence
for eg :
Bus No.1 should travel via the following stops in a given sequence
Stop Name Sequence
Stop1 1
Stop2 2
Stop3 3
Stop4 4
Stop5 5
Bus No.2 should travel via the following stops in a given sequence
Stop Name Sequence
Stop1 1
Stop4 2
Stop2 3
Stop3 4
Stop5 5
Bus No.3 should travel via the following stops in a given sequence
Stop Name Sequence
Stop4 1
Stop3 2
Stop2 3
Stop5 4
Stop1 5
Whenever a bus touch any stop the record and time of the bus arrival is been entered in to system
now i want that when the record is entered it should check if the particular bus has come through the proper sequence which means it has not skipped the
pervious stop.
if it has been skipped then record should not be inserted...
how do i check this in SQL?
Can some one give me a rough idea how to tacke this ...
Thanx in Advance

