codetoad.com
Home||ASP|ASP.Net|C++/C#|DHTML|HTML|Java|Javascript|Perl|VB|XML||CodeToadPlus!||Forums||RAM
Search Site:
Search Forums:
Check Proper Sequence sr_aneesh at 12:56 on Monday, January 03, 2005

Thers are three buses running for a school. Bus No's are 1,2 and 3.
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


Re: Check Proper Sequence Yusairi at 17:44 on Sunday, February 27, 2005

hi sr_aneesh,

first, for each BUS you need to select all the Top 4 busstop which sorted with the arrivaldatetime, then, compare the current busstop.
if your compare the current busstop is not listed, then, you can add the data directly.
but, if you found the current busstop is currently on the list, please ginore the insertion record and give the warning message.

good luck with your assignment.

<Added>

besides that, you have the record which record the sequence busstop to be arrived. then, it will easy for you.
it's all on your mind to solve it. the objectives still same but the admin need always configure the destination on each bus. fortunately, it's the best to plan the route of the bus otherwise, the bus managament will get fully complaint on the bad services. hehehe.

:)









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
matrix addition
Re: Storing data from HTML to Excel or TXT
Re: function within loop problem
Re: Ô‡´ò¥¯¥é¥Ö¤Ï ¥Æ©`¥é©`¥á¥¤¥É£ò£±£±¥¢¥¤¥¢¥ó ¤Î£··¬ ¤Ç¤¹
Re: Replace
Re: タイトリスト AP2アイアン 712�情�
Re: SMS from Perl using HTTP request
Re: Charl Schwartzel
Re: Adhyayan - Annual Student Conference and Online Coding Festival


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


Copyright codetoad.com 2001-2013