我有一個關於如何根據員工性別找到工資歧視的問題。我有MS Acess 2007,必須使用SQL查詢算出它如何對多個查詢中的多個列進行排序?
請記住,這是我將3個表合併成一個多表查詢之後。在此查詢,每當我想與排序任何列,例如,ORDER BY Salary
,它給了我一個錯誤牌子,上面寫着:
Syntax error (missing operator) in query expression 'Salary'
WHERE JobClass.JobClassID = Employees.JobClassID
AND Department.DepartmentID = Employees.DepartmentID'.
我想嘗試排序的查詢中多列。
下面是多表查詢代碼總數:
SELECT JobClass.JobClassID, JobClassName, Department.DepartmentID,
DepartmentName, LastName, FirstName, Title, Sex, Years, Salary
FROM JobClass, Employees, Department
ORDER BY 'Salary'
WHERE JobClass.JobClassID = Employees.JobClassID AND Department.DepartmentID = Employees.DepartmentID;
'爲了by'後應' where條款 –
並從訂單B中刪除'' Y'薪水' –