SELECT id from <table> where id between @vchAAPNumber2 and @vchEndAAP
This will either return 0 results (no dupes) or return ids that already exsist and those would be your dupes.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========