Query to fetch 1st uncancelled line for a Sales order
Hi All,
I need my query to fetch the 1st uncancelled line of a Sales order. Currently, I am using code snippet:
ROW_NUMBER() OVER (PARTITION BY DOLA.DISPLAY_LINE_NUMBER ORDER BY DOLA.DISPLAY_LINE_NUMBER) AS RN
and choosing RN=1
But it isn't giving me accurate results.
Any inputs on this is greatly appreciated.
Thanks!