If the 01 is real data, it needs to be stored as such and not calculated - because it's data?
We know (or should) that you cannot rely on sort order in tables alone, so assigning a rank value on the fly could result in
22-2345-02 | 01/01/2022
22-2345-03 | 02/01/2022
on one day and on another
22-2345-02| 02/01/2022
22-2345-03| 01/01/2022
This is why I dislike posts that have the absolute minimum of inputs and desired outputs. If the number (22-2345) relates to test data such as when, by whom, date, etc. that is one table, and batch data belongs in another. IMO not enough info to provide focused answers but that's just me.
Last edited by Micron; 11-09-2022 at 09:39 AM.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.