本文介绍了子句顺序与访问权限冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮我解决这个问题,因为我一直无法克服这个问题
Please help me with this as I have been unable to get past this problem
在尝试执行此语句时:
SELECT distinct grade
FROM tblStudents
ORDER BY Val([grade]),grade;
access告诉我ORDER BY
子句Val([grade])
与Distinct
access tells me that ORDER BY
clause Val([grade])
conflicts with Distinct
我该如何解决?
提前谢谢
推荐答案
使用DISTINCT
关键字与按SELECT
子句中的所有列进行分组具有相同的效果:
Using the DISTINCT
keyword has the same effect as grouping by all columns in the SELECT
clause:
SELECT grade
FROM tblStudents
GROUP
BY grade
ORDER
BY VAL(grade), grade;
请注意,我必须删除grade IS NULL
处的行,否则会出现错误条件表达式中的数据类型不匹配".
Note I had to remove rows where grade IS NULL
, otherwise I got an error, "Data type mismatch in criteria expression."
这篇关于子句顺序与访问权限冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!