T-sql Reset Row number on Field Change

前端 未结 4 991
生来不讨喜
生来不讨喜 2020-12-10 03:58

Similar to a recent post of mine \"t-sql sequential duration\"”, but not exactly the same, I want to reset the row number based on a change in column x (in my case, column \

4条回答
  •  忘掉有多难
    2020-12-10 04:44

    Instead of:

    PARTITION BY custno ORDER BY custno, moddate, who)
    

    try:

    PARTITION BY custno, who ORDER BY custno, moddate)
    

提交回复
热议问题