Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. SELECT MIN(Maintenance_Log.Log_StartDate) As MaintDate, Manufacturer.Manufacturer_Name, GL_Inventory.Inventory_Model, GL_Inventory.Inventory_SerialNr, Maintenance_Log.Event_ID, Maintenance_Log.Inventory_ID
  2. FROM Maintenance_Log INNER JOIN GL_Inventory ON Maintenance_Log.Inventory_ID = GL_Inventory.Inventory_ID INNER JOIN Manufacturer ON GL_Inventory.Manufacturer_ID = Manufacturer.Manufacturer_ID)
  3. WHERE Maintenance_Log.Owner_ID = @OwnerID AND Maintenance_Log.Log_CompletedDate Is Null
  4. GROUP By Maintenance_Log.Log_StartDate, Manufacturer.Manufacturer_Name, GL_Inventory.Inventory_Model, GL_Inventory.Inventory_SerialNr, Maintenance_Log.Event_ID, Maintenance_Log.Inventory_ID
  5.  
  6. 2016-06-30 09:00:00.000 GLOCK G19 Gen 4 ABDE1234 2 6
  7. 2016-07-01 09:00:00.000 S&W 642 WQ32De45 9 7
  8. 2016-07-28 09:00:00.000 GLOCK G19 Gen 4 ABDE1234 3 6
  9. 2016-08-05 09:00:00.000 S&W 642 WQ32De45 10 7
  10. 2016-08-25 09:00:00.000 GLOCK G19 Gen 4 ABDE1234 4 6
  11. 2016-09-02 09:00:00.000 S&W 642 WQ32De45 11 7
  12. 2016-09-29 09:00:00.000 GLOCK G19 Gen 4 ABDE1234 5 6
  13. 2016-10-07 09:00:00.000 S&W 642 WQ32De45 12 7
  14. 2016-10-27 09:00:00.000 GLOCK G19 Gen 4 ABDE1234 6 6
  15. 2016-11-04 09:00:00.000 S&W 642 WQ32De45 13 7
  16. 2016-11-24 09:00:00.000 GLOCK G19 Gen 4 ABDE1234 7 6
  17. 2016-12-02 09:00:00.000 S&W 642 WQ32De45 14 7
  18. 2016-12-29 09:00:00.000 GLOCK G19 Gen 4 ABDE1234 8 6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement