I'm sure this has been posted many times, but I never had a need until now.
- I have a DB that tracks engineering jobs.
- Each JOB can have many TASKS.
- I need to track each TASK by a unique ID number in this format:
YYYY - JOB# - TASK#
Each Job number is sequential starting at 1 on January 1st.
Each Task number is sequential starting at 1 with each new JOB.
For example:
2008-37-02 is the 2nd task of the 37th job in the year 2008.
Every new JOB moves starts the task counter back to 1.
Every new YEAR starts the JOB numbers back to 1.
What is the best way to do this?
Thanks!
Peter
- I have a DB that tracks engineering jobs.
- Each JOB can have many TASKS.
- I need to track each TASK by a unique ID number in this format:
YYYY - JOB# - TASK#
Each Job number is sequential starting at 1 on January 1st.
Each Task number is sequential starting at 1 with each new JOB.
For example:
2008-37-02 is the 2nd task of the 37th job in the year 2008.
Every new JOB moves starts the task counter back to 1.
Every new YEAR starts the JOB numbers back to 1.
What is the best way to do this?
Thanks!
Peter
Comment