I have a table which uses an incrementing non-autonumber counter field that gets concactinated with the year portion of now() to generate a job number in text format (01-9999).
At the new year, the counter will need to reset to 0000. However, in my query to get the last record, I'm currently using max(counter) to get the last record inserted. If I manually set the counter to 0 in the last record, the max(counter) obviously won't see that as the last record and at the new year, the jobnumber will start at max(counter)+1 (which is around 2500 right now) instead of 0+1 Chandler
I ran over my dogma with karma!
At the new year, the counter will need to reset to 0000. However, in my query to get the last record, I'm currently using max(counter) to get the last record inserted. If I manually set the counter to 0 in the last record, the max(counter) obviously won't see that as the last record and at the new year, the jobnumber will start at max(counter)+1 (which is around 2500 right now) instead of 0+1 Chandler
I ran over my dogma with karma!