Announcements
Hi Experts,
I have a requirements that I have some customer accounts with multiple sales prices for an item in the same period. I need to take the least sales price record from the table PriceDiscAdmTrans. This is to be added in a report.
1. Customer A with sales price 100
2. Customer A with sales price 200
3. Customer B with sales price 150
Output should be Customer A with 100 & Customer C with 150. how can I get this output using select statement?.
Thanks in advance.
Hi AX beginner,
The ROW_NUMBER doesn't exist in X++.
You could create a view with a computed column as the data source of the SSRS, please have a look at Martin's blog:
Hi Will Wu,
Thanks for the reply.
how can I use the same in X++ ?
Hi AX Beginnner,
See the T-SQL:
SELECT accountcode, AMOUNT FROM (SELECT *, ROW_NUMBER() OVER (PARTITION BY accountcode ORDER BY amount asc) AS num FROM PriceDiscAdmTrans) t WHERE num=1
André Arnaud de Cal...
293,998
Super User 2025 Season 1
Martin Dráb
232,850
Most Valuable Professional
nmaenpaa
101,158
Moderator