EN | DE | ES
Stamm KAT Image
11 Apr 2002 201.35 stats
×

KAT

Administratorin an Laptop - unabhängig vom PC
×
16 Jul 2002
-1.40
11694 hits

Untitled

Wie kann ich doppelte Datensätze löschen?

TopLabs (Answers)

Thumbnail TopLab Author Date Reward
-- begining of query that you need declare @count int declare @call_code int declare tmpcursor cursor for select call_code, count(*) from ##cah group by call_code having COUNT(*) > 1 open tmpcursor fetch next from tmpcursor into @call_code, @count while @@fetch_status = 0 begin   set @count = @count - 1   set rowcount @count   delete from ##cah where call_code = @call_code   fetch next from tmpcursor into @call_code, @count end close tmpcursor deallocate tmpcursor go -- end of query Frederic Luchting 2002-07-16 $13.53