SELECT XPO.ITEM_CODE AS [ITEM CODE], IT.DESCRIPT AS [DESCRIPTION], XPO.STK_ITEM_QTY AS [ORDERED],
XPO.RECEIVED, IT.TAXABLE, XPO.STK_MEAS AS UM, XPO.COST, XPO.DISCOUNT_V AS [DISCOUNT VALUE],
XPO.DISC_V_FEX AS [DISCOUNT AMOUNT], XPO.COST_FEX AS [COST AFTER DISCOUNT],
XPO.TAX_AMOUNT AS [TAX AMOUNT], XPO.TAX_TABLE AS [TAX CODE], XPO.ASSET_ACNT AS [ACCOUNT],
XPO.DEPT AS [LOC/SUB-LOC], XPO.JOBCODE AS [JOB CODE], XPO.RECOVERABLE_TAX_AMT AS [RECOVERABLE TAX],
XPO.RECOVER_TAX_AMT_FEX AS [NON- RECOVERABLE TAX], XPO.ORIG_AMOUNT AS [LANDED COST],
XPO.ORIG_AMOUNT_FEX AS [LANDED EXCLUSIVE TAX], IT.BRAND, IT.CATEGORY,
IT.MODEL,PO.ESTDATE AS [DELIVERY DATE], PO.RECEIVED_STATUS AS [RECEIVED STATUS],
PO.INVOICED_STATUS AS [INVOICED STATUS], PO.QUOTE_NO AS [PO #], XPO.CUSTCHAR1, XPO.CUSTCHAR2,
XPO.CUSTCHAR3, XPO.CUSTCHAR4, XPO.CUSTDATE1, XPO.CUSTDATE2, XPO.CUSTDATE3, XPO.CUSTDATE4,
XPO.CUSTLOG1, XPO.CUSTLOG2, XPO.CUSTLOG3, XPO.CUSTLOG4, XPO.CUSTMEMO1, XPO.CUSTMEMO2, XPO.CUSTMEMO3,
XPO.CUSTMEMO4, XPO.AMOUNT
FROM dbo_X_PO XPO
INNER JOIN dbo_ITEMS IT ON (XPO.ITEM_CODE = IT.ITEMNO)
INNER JOIN dbo_PO PO ON (PO.ORDER_NO = XPO.ORDER_NO) WHERE PO.ORDER_NO = '';
当我在 sql server 中执行这个查询时,它工作得很好,但是当我在 MS Access 中运行它时,它调试错误 IE,查询表达式中的语法错误(缺少运算符)dbo_X_PO XPO INNER JOIN dbo_ITEMS IT ON (XPO.ITEM_CODE = IT.ITEMNO) INNER JOIN dbo_PO PO ON (PO.ORDER_NO = XPO.ORDER_NO)