I have 1,000 D/O every month, D/O is deleted when canceled
How do you usually find this deleted D/O ?

this month D/O range is 2,301 to 3,300, D/O table name is do_hdr,
You can list D/O by following SQL
select * from do_hdr where do_no between 2,301 and 3,300
deleted D/O is 2310, 2350, 3000, 3150 (Answer)

1. using SQL only (including stored procedure), for generation of No. from 2301 to 3300.
select * from gen_no(2301,3300) where g_no not in (select do_no from
do_hdr where do_no between 2300 and 3300)
min 2301, max 3300, diff 1000
How do you generate No. ? 2 args, gen_no(2301,3300)

2. Any other way ?

ex. following stored procedure generate no, but need require Server option
PROCEDURE gen_no"(fr_no integer,to_no integer)
begin
with recursive num(nu) as
(select fr_no
union all
select nu+1 from num where nu <= to_no
)
select nu from num;
end

select * from gen_no(2301,3300) where g_no not in (select do_no from
do_hdr where do_no between 2300 and 3300)