I have a table with (amongst other data) a field of dated order numbers for each of several sales team members. Before we load this data into the finance system each day we need to check that the first order number of the day for each member of the sales team follows on from his last order number of the previous day (i.e. last order number +1) or from the last day he worked which may be a number of days/weeks ago.
How do I, for example on the 18/11/16, check that the first order number on 18/11/16 for each salesperson = the last order number +1 for that salesperson when I don't know how many days ago that 'last order' was?
Thanks
Peter
