关于Access 分组排序的问题

searoom 2004-01-15 11:54:29
发现 Access 的在分组后的排序有问题,
下面这个语句竟然提示错误:

select barcode,sum(InAmount) as Amount
from indetail
group by barcode
order by Amount

错误提示为:参数 Amount 没有默认值
...全文
292 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
changechange 2004-01-16
  • 打赏
  • 举报
回复
select barcode,sum(InAmount) as Amount
from indetail
group by barcode
order by sum(InAmount)
wydpz 2004-01-16
  • 打赏
  • 举报
回复
修改为以下试试看:
select barcode,sum(InAmount) as Amount
from indetail
group by barcode
order by sum(InAmount)
jiezhi 2004-01-16
  • 打赏
  • 举报
回复
語法這麼要求的。排序的字段必須是那個表中的字段,且不使用別名。
searoom 2004-01-16
  • 打赏
  • 举报
回复
asdfs
searoom 2004-01-15
  • 打赏
  • 举报
回复
为什么排序的时候不能使用别名呢?

7,714

社区成员

发帖
与我相关
我的任务
社区描述
Microsoft Office Access是由微软发布的关系数据库管理系统。它结合了 MicrosoftJet Database Engine 和 图形用户界面两项特点。
社区管理员
  • Access
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧