The first digit is derived from the year i.e in the year 2002, the digit would be 2,
for 2003 it will be 3.
The remaining three digits are then derived from the number of the day in the year
i.e. for January 31 it will be 2031.
i.e.today 18th Nov.2002,
which is 322nd day of the year so will be 2322
similarly which will become 2323 tomorrow.
Hope above is clear.
Can u Suggest the query for the same in SQL/PLSQL