SELECT TOP (100) PERCENT dbo.vwLatestEquipment.equipServID, dbo.tblEquipInvoice.invoiceDateSent, dbo.tblEquipment.equipManafacturer,
dbo.tblEquipInvoice.contractNumber, dbo.tblEquipment.equipmentID, dbo.tblEquipment.equipStatus, dbo.tbl_work_locations.work_location,
dbo.vwLatestEquipment.calibDueDate
FROM dbo.vwLatestEquipment INNER JOIN
dbo.tblEquipLocations ON dbo.vwLatestEquipment.locationID = dbo.tblEquipLocations.locationID INNER JOIN
dbo.tblEquipInvoice ON dbo.tblEquipLocations.invoiceID = dbo.tblEquipInvoice.invoiceID INNER JOIN
dbo.tblEquipment ON dbo.vwLatestEquipment.equipServID = dbo.tblEquipment.equipServID INNER JOIN
dbo.tbl_work_locations ON dbo.tblEquipInvoice.workLocationID = dbo.tbl_work_locations.work_id
GROUP BY dbo.tbl_work_locations.work_location, dbo.vwLatestEquipment.equipServID, dbo.tblEquipInvoice.invoiceDateSent, dbo.tblEquipment.equipManafacturer,
dbo.tblEquipInvoice.contractNumber, dbo.tblEquipment.equipmentID, dbo.tblEquipment.equipStatus, dbo.tbl_work_locations.work_location,
dbo.vwLatestEquipment.calibDueDate
ORDER BY dbo.vwLatestEquipment.equipServID
這是一個一直傳遞到我從我的繼任者,認爲上述工作正常進行的目的,除了它返回calibDateDue所有值我想要equipmentID的每一個項目是爲它返回每個設備(equipmentID)的最新calibDueDate任何幫助將不勝感激今天,因爲我煎炸,無法取得很大進展。選擇單記錄多個類似的結果
關於'TOP(100)PERCENT':(HTTP://計算器.COM /問題/ 1622878 /爲什麼使用選機上100%) –