这最初是一个更新DISTINCTROW的Access查询。我似乎无法找到在SQL Server中执行此操作的等效方法。它甚至可能吗?因为它是用SQL Server编写的:
UPDATE CustOrder
SET CustOrder.YARDS = QUANTITY * Lkp_Codes.VOLUME_GALS * 0.00495113
FROM CustOrder
INNER JOIN Lkp_ServiceCodes as Lkp_Codes
ON CustOrder.SERVICE_CODE = Lkp_Codes.[SVC CODE]