select 'Active' as VS, registrationno, gps_datetime,speed,location from gpsdata_previous where registrationno in(select registrationno from vehicle_superuser where superuserid=@uid) AND(GPS_DATETIME BETWEEN @fromdate AND @todate) and speed <>0 union select 'Inactive' as VS,registrationno,gps_datetime,speed,location from gpsdata_previous where registrationno in(select registrationno from vehicle_superuser where superuserid=@uid) AND(GPS_DATETIME BETWEEN @fromdate AND @todate) and speed=0
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)