You could use a SQL statement to identify missing sequence numbers by basically performing a self-join against itself and using the sequence number as paramerter, e.g.
Code:

select a.seq
from table_a as a
full join table_a as b
on a.seq=b.seq-1
where b.seq is null



But why is this done in a login script and not via central admin script? Renaming workstations requires admin privs and a reboot anyway.
_________________________
There are two types of vessels, submarines and targets.