Hi,
I had created a FMS and set to auto generate when user select the customer code in OSCL.
However, there will be an issue when two OSCL were open at the same time, it will generate the same numbering but when saved, it will be duplicate numbering and skip one of the numbering.
For example:
Open status
OSCL one - numbering ABC0001
OSCL two - numbering ABC0001
Saved (Duplicate numbering)
OSCL one - numbering ABC0001
OSCL two - numbering ABC0001
Next numbering
OSCL - ABC0003
Missing numbering = ABC0002
The query as below:
Declare @fmt_num as Integer
Select @fmt_num=count(OSCL.CallID) from OSCL
SELECT 'ABC'+ replace(str((@fmt_num)+1,7,0),' ',0)
Can anyone help to refine the query or there is others way.