需要将该查询转换为sql server。我尝试了几个例子,但它们对我没有用。
TRANSFORM Sum(CUST_ORDER_LINE.ORDER_QTY) AS SumOfORDER_QTY
SELECT CUST_ORDER_LINE.PART_ID
FROM CUSTOMER_ORDER LEFT JOIN CUST_ORDER_LINE ON CUSTOMER_ORDER.ID = CUST_ORDER_LINE.CUST_ORDER_ID
WHERE (((CUST_ORDER_LINE.PART_ID) Is Not Null) AND ((CUSTOMER_ORDER.STATUS) In ('F','R')))
GROUP BY CUST_ORDER_LINE.PART_ID
PIVOT CUSTOMER_ORDER.STATUS