If you are using Sybase, you can delete duplicate rows from a table by creating a unique clustered index 'with ignore_dup_row' (and then dropping it again if you don't want to ignore later duplicate inserts). I haven't benchmarked but I think this will be somewhat faster than a stored procedure.
Anyway, this gets offtopic for the DBI list - if you want to write some SQL at the client for it, ask an SQL mailing list, and if you want to get the best performance on a particular RDBMS, ask a list for that system. -- Ed Avis <[EMAIL PROTECTED]>