When I build an index as unique I get about 100 or duplicate records. I want to remove the dupes. Is there any way to remove the ones that were not indexed or do I have to drop the index, delete the dupes and re-index.? the total database is about 38million rows.
You could, especially if there is some other value you can key off of. Say you have a field Key, that has duplicates but a unique index, and id which is unique:
delete from Table where id <> 'good id' and Key + '' = 'Keyvalue';
Key + '' will prevent it using the index.