任何人都可以幫助解決這個問題嗎?我嘗試了所有我能想到的,沒有運氣的事情。如何修復MySQL查詢以解決「未知列......在子句中」錯誤?
我有以下MySQL查詢和它吐出以下錯誤
錯誤: 未知列在「SR.sales_rec_id '的條款'
QUERY:
SELECT
SYSKEY.cri_sr_id,
SR.sales_rec_id,
SYSKEY.adnum,
charge,
SYSKEY.cancelsale,
paymentdue,
merchant,
paymentnum,
authorization as authcode,
CONCAT(lastname,', ',firstname,' ',middleinitial) as customer,
CONCAT(replname,', ',repfname) as repname,
FROM CRI_SR_KEYS as SYSKEY
INNER JOIN SALES_PENDING as SPEND on SPEND.sales_rec_id=SR.sales_rec_id
INNER JOIN SALES_RECORD as SR on SR.cri_sr_id=SYSKEY.cri_sr_id
LEFT JOIN CLIENT_INFO as CI on CI.client_id = SYSKEY.clientid
LEFT JOIN SALES_REPS as REP on SR.rep_id=REP.repid
WHERE SPEND.authorization NOT LIKE '000000' AND paymentdue LIKE CURDATE()
ORDER BY adnum ASC LIMIT 0,5000
注有repname'後'一個錯誤的逗號'FROM'子句之前... – 2012-02-17 03:52:27
加入表** SALES_RECORD爲SR * *之前** SALES_PENDING作爲SPEND ** – 2012-02-17 05:11:17