Link to home
Start Free TrialLog in
Avatar of David C
David CFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Reset row_number on field change

Hi Experts, given the query attached and results, how do I get it to reset the row_number() every time the order_no changes?

So instead of the row_number() / line_number continually incrementing, I want it to go 1,2,3 then 1,2,3,4,5 depending on the lines in the order

User generated image
ASKER CERTIFIED SOLUTION
Avatar of Phillip Burton
Phillip Burton

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of nishant joshi
nishant joshi
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of David C

ASKER

Excellent!
Avatar of David C

ASKER

Apologies moderator, I meant to give all experts a share of points as all answers are correct. How do I do this?
Avatar of Phillip Burton
Phillip Burton

I have requested the question to be re-opened.
Avatar of David C

ASKER

Thank you all!