Hi.
How can i find in invoice series after missig sequence first serie.
Like this:
A402020000000001
A402020000000002
A402020000000006
İ Have codes for finding missing sequence series for example
(A402020000000003-A402020000000004-A402020000000005)
my question answer is must be ;
for A402020000000003 serie i must find A402020000000006 (next first seri)
for A402020000000004 serie i must find A402020000000006 (next first seri)
for A402020000000005
serie i must find A402020000000006 (next first seri)
What I have tried:
NEXTFIRST = "SELECT MAX(SERIE) FROM TABLE WHERE SERIE =LPAD(A.SERIE,7)||LPAD((TO_NUMBER(SUBSTR(A.SERIE,8,9))+1),9,0) "
in this code i find next seri only for
A402020000000005
result is
A402020000000006
others A402020000000003 and A402020000000004 is null