Asset Numbering Escaping
Dear All,
We have ran following after setups but system still escaping Asset numbering.
--BEGIN OF THE SCRIPT--
set serveroutput on size 1000000
declare
cursor c1 is
select asset_number from fa_additions_b;
l_max number;
l_temp number;
begin
l_max := 0;
for cc1 in c1 loop
begin
l_temp := to_number(cc1.asset_number);
if l_temp = trunc(l_temp) and l_temp > l_max then
l_max := l_temp;
end if;
exception when others then
NULL;
end;
end loop;
dbms_output.put_line ('Max Asset Number: ' || l_max);
end;
--END OF THE SCRIPT--
B. You can then reset the sequence as follows using value 10001 for <XXX>