Good morning,I'm sure there is a simple answer to this. I'm trying to increment a number but only by po. select ap.Document, (select case when ap.Location = 'KN' then keenevalue else charlestownvalue end from PSoftCodes p where CodeName = 'ap_intf_seq') + row_number() over(order by po) increment from Get_PS_AP_Info apWHERE Submission_Status is nullAND Status = 'POSTED'and Location = 'kn'
what I want to see happen is this:83684656 1561533447ACR 15616334477A 1561781094 1561881094 1561881094 15618
What I actually get is this:83684656 1561533447ACR 15616334477A 1561781094 1561881094 1561981094 15620
Is there a way to group by a PO number in this case?ThanksLaura