Are you deleteing all your call records or just the duplicates?
Here is a script that I wrote a while back to created "Delete From..."
type commands. Remember, SQL only allows a certain batch size, so
you probably can't just run this big on (ie, split it into small
batches).
Select cmd="Delete From Calls Where AcctSessionID = '" + AcctSessionID +
"'" +
" AND NASIdentifier = '" + NASIdentifier + "'" +
" AND NASPort = " + convert(varchar(7), NASPort) +
" AND AcctStatusType= " + convert(varchar(3),AcctStatusType) +
" AND AcctDelayTime <> " + convert(varchar(7), Min(AcctDelayTime) )