|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
i need some help in SQL server 2000 Query
i am doing a real time project. in that i need an sql query. plase go through the data in the table and help me to get the result.
Data in the table is : BulbNo State ChangeTime 2 OFF 19/08/2004 21:23:10 2 ON 19/08/2004 21:22:10 2 OFF 19/08/2004 21:20:10 4 ON 19/08/2004 21:18:50 4 OFF 19/08/2004 21:17:00 7 OFF 19/08/2004 21:13:30 7 ON 19/08/2004 21:12:50 7 OFF 19/08/2004 21:12:40 9 ON 19/08/2004 21:12:30 9 OFF 19/08/2004 21:11:00 10 ON 19/08/2004 21:12:30 10 OFF 19/08/2004 21:11:00 2 ON 19/08/2004 20:22:10 2 OFF 19/08/2004 20:20:10 5 ON 19/08/2004 20:12:30 5 OFF 19/08/2004 20:11:00 7 ON 19/08/2004 20:12:50 7 OFF 19/08/2004 20:12:40 9 ON 19/08/2004 20:12:30 9 OFF 19/08/2004 20:11:00 The result I am expecting is like this : To show the Previous and the Present states of each bulb, with its state change timings and the time diff. between these States B.No Cur. State Cur. Time Prev. state Prev. Time Time Diff.(in sec.) 2 OFF 19/08/2004 21:23:10 ON 19/08/2004 21:22:10 60 4 ON 19/08/2004 21:18:50 OFF 19/08/2004 21:17:00 110 5 ON 19/08/2004 20:12:30 OFF 19/08/2004 20:11:00 90 7 OFF 19/08/2004 21:13:30 ON 19/08/2004 21:12:50 40 9 ON 19/08/2004 21:12:30 OFF 19/08/2004 21:11:00 90 10 ON 19/08/2004 21:12:30 OFF 19/08/2004 21:11:00 90 thanx in adv. Mohan G |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > i need some help in SQL server 2000 Query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|