如果這個工程:嵌套INNER JOIN使用MS Access 2003中通過ODBC
SELECT COUNT(t1.ID) AS count FROM Project t1
INNER JOIN (SELECT DISTINCT t.Site,t.id FROM _Equipment_id t WHERE t.OEM LIKE '%ABC%') t2 ON t1.Site=t2.Site AND t1.id=t2.id
和這個作品:
SELECT COUNT(t3.ID) AS count FROM Wall t3
INNER JOIN Project t1 ON t3.Project_number=t1.Project_number
爲什麼不這項工作:
SELECT COUNT(t3.ID) AS count FROM Wall t3
INNER JOIN Project t1 ON t3.Project_number=t1.Project_number
INNER JOIN (SELECT DISTINCT t.Site,t.id FROM _Equipment_id t WHERE t.OEM LIKE '%ABC%') t2 ON t1.Site=t2.Site AND t1.id=t2.id
最終,我有10個桌子,比如Wall桌子,我試圖從第一個SELECT中獲得總計數。......
你得到什麼錯誤? – Elliott 2011-04-12 19:50:09
我的ASP頁面的客戶端未定義的結果,當SQL語句中存在語法錯誤時,這是相同的錯誤。 – shaun5 2011-04-12 19:58:58