Guest User

Untitled

a guest
Jan 18th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. /* Formatted on 2011/08/05 17:09 (Formatter Plus v4.8.7) */
  2. SELECT t2.flag, t3.reg_number, t1.reportdate, t1.latitude, t1.longitude,
  3. t1.value2 course, ((t1.measspeed) * 3.6) / 1.852, t1.status alarms
  4. FROM traffic t1, details t2, registernumbers t3
  5. WHERE t1.mobileno = t2.mobile
  6. AND t2.mobile = t3.mobileno
  7. AND UPPER (t2.flag) = UPPER ('BEL')
  8. AND t1.reportdate BETWEEN '1/jan/2011' AND '1/jul/2011'
  9. AND (latitude > 52 AND longitude > 2)
  10. AND latitude > 48
  11. OR (latitude < 52 AND longitude > 2)
  12. OR (latitude > 52 AND longitude < 2)
  13. ORDER BY reportdate DESC
  14.  
  15. WHERE t1.mobileno = t2.mobile
  16. AND t2.mobile = t3.mobileno
  17. AND UPPER (t2.flag) = UPPER ('BEL')
  18. AND t1.reportdate BETWEEN '1/jan/2011' AND '1/jul/2011'
  19. AND (latitude > 52 AND longitude > 2)
  20. AND latitude > 48
  21. OR (latitude < 52 AND longitude > 2)
  22. OR (latitude > 52 AND longitude < 2)
  23.  
  24. WHERE t1.mobileno = t2.mobile
  25. AND t2.mobile = t3.mobileno
  26. AND UPPER (t2.flag) = UPPER ('BEL')
  27. AND t1.reportdate BETWEEN '1/jan/2011' AND '1/jul/2011'
  28. AND (latitude > 52 AND longitude > 2)
  29. AND ( latitude > 48
  30. OR (latitude < 52 AND longitude > 2)
  31. OR (latitude > 52 AND longitude < 2) )
  32.  
  33. WHERE
  34. t1.mobileno = t2.mobile
  35. AND t2.mobile = t3.mobileno
  36. AND UPPER (t2.flag) = UPPER ('BEL')
  37. AND t1.reportdate BETWEEN '1/jan/2011' AND '1/jul/2011'
  38. AND (latitude > 52 AND longitude > 2)
  39. AND latitude > 48
  40. OR (latitude < 52 AND longitude > 2)
  41. OR (latitude > 52 AND longitude < 2)
  42.  
  43. WHERE
  44. t1.mobileno = t2.mobile
  45. AND t2.mobile = t3.mobileno
  46. AND UPPER (t2.flag) = UPPER ('BEL')
  47. AND t1.reportdate BETWEEN '1/jan/2011' AND '1/jul/2011'
  48. AND (latitude > 52 AND longitude > 2)
  49. AND (
  50. latitude > 48
  51. OR (latitude < 52 AND longitude > 2)
  52. OR (latitude > 52 AND longitude < 2)
  53. )
Add Comment
Please, Sign In to add comment