Date next date. Qty. Item1. Item2 2020-08-01. 2020-08-15. 2. 1. 1 2020-08-15. 2020-08-28. 3. 1. 2 2020-08-28. ???? 2020-09-01
Select distinct t1.AccNo,t1.in date,ifnull((select min(t1.min.in date) from t1 as t1min where t1min.in date>t1.in date and t1.AccNo = t1min.AccNo), Date(t1.in date,'start of month', '+1 month', '0 day')) as nextdate
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)