我有这个:
select ordernr
from users
having count(ordernr) =
( select max(count(ordernr))
from users where ordernr = ordernr
group by ordernr )
group by ordernr
从所有用户那里获取最常用的订单号(ordernr)。
如何将其导入 ABAP SAP 系统?我试过这个:
select SINGLE ordernr
from ZDEVXXX_PROJECT3 INTO ordernrU
having count( * ) =
( select max( count( * ) )
from ZDEVXXX_PROJECT3
where ordernr = ordernr
group by ordernr )
但我得到这个错误:
"Unknown columnname COUNT("
如何在 ABAP 中结合最大值和计数?上面的 SQL 查询在 Oracle 中为我工作。谢谢!