Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sanju.np
Starting Member
2 Posts |
Posted - 2011-04-05 : 05:03:25
|
| I am working on a fleet management software. I have table with a field named "status of vehicle with values 1 or 0". That is, if the vehicle is driving the status will be 0 and when it is parked, status will be 1. How to group base on this field. And i want to get the vehicles total stay minutes and moving minutes. Table is like below. REC_NO INTEGER 4 No TMNL_ID VARCHAR 20 No MSG_TYPE VARCHAR 5 No IN_DATE TIMESTAMP 10 No IN_TIME TIME 3 No VA CHARACTER 2 No LAT DECIMAL 20 No LNG DECIMAL 20 No TMNL_LOC VARCHAR 200 Yes SPEED DECIMAL 10 No GMT_DATE DATE 4 No GMT_TIME TIME 3 No DIRECTION DECIMAL 10 No IO_PINS VARCHAR 20 No MILEAGE DECIMAL 10 No HANDLE DECIMAL 2 Yes STATUS VARCHAR 2 YesPlease help me...Doubt |
|
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2011-04-05 : 05:21:27
|
| Which fields are used to log your times i.e. start and stop times when moving |
 |
|
|
sanju.np
Starting Member
2 Posts |
Posted - 2011-04-05 : 07:26:02
|
quote: Originally posted by NeilG Which fields are used to log your times i.e. start and stop times when moving
Thank you for your kind reply ...In this table datas will be inserted one by one. IN_DATE is the field to store the insertion datetime.Doubt |
 |
|
|
|
|
|