Select a.dGPSDateTime ,a.vSequenceID From (select top 5 dGPSDateTime , vSequenceID from tblCommonTrackingData where vReportID = 8 AND CAST(vpkDeviceID as bigint)= 862193020453528 and dGPSDateTime >= '2014-12-17 17:06:33.000' --and not exists -- (select vpkDeviceID -- from tblTrip_Master -- where nEndEventInst = 913565) order by dGPSDateTime) as a
Where vSequenceID isn't 913565
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
19 Experts available now in Live!