SELECT row_number() OVER (ORDER BY branchcode ASC) as nos, branchdesc, statecode
from branch
以下是来自数据库的结果
nos branchdescp statecode
1 Kelana jaya 10
2 Petaling jaya 10
3 Kuala Lumpur 14
4 Ampang 14
5 Kota Bharu 03
6 Ipoh 05
当前,我们正在使用仪表板来显示列表数据
如果我按状态码= 14进行过滤,则希望报告显示如下
nos branchdescp statecode
1 Kuala Lumpur 14
2 Ampang 14
SELECT row_number() OVER (ORDER BY branchcode ASC) as nos, branchdesc, statecode
from branch
where branchcode = 14
数据库显示的结果如上,但是在仪表板中的显示如下,似乎mstr不执行查询。
nos branchdescp statecode
3 Kuala Lumpur 14
4 Ampang 14
我的问题是,如何使报告编号成为1和2?