{"topLabGuid":"29872cf1-bff2-48d6-a6b0-cc297ca01858","stammGuid":"1951cc74-e2b6-4523-a336-d52a5dd6908c","postItGuid":"f574a374-1f83-4cfe-9a82-0587f8cbf650","titel":null,"topLab1":"-- begining of query that you need\r\ndeclare @count int\r\ndeclare @call_code int\r\ndeclare tmpcursor cursor\r\nfor\r\nselect\r\ncall_code, count(*)\r\nfrom\r\n##cah\r\ngroup by\r\ncall_code\r\nhaving\r\nCOUNT(*) > 1\r\nopen tmpcursor\r\nfetch next from tmpcursor into @call_code, @count\r\nwhile @@fetch_status = 0\r\nbegin\r\n\u00A0 set @count = @count - 1\r\n\u00A0 set rowcount @count\r\n\u00A0 delete from ##cah where call_code = @call_code\r\n\u00A0 fetch next from tmpcursor into @call_code, @count\r\nend\r\nclose tmpcursor\r\ndeallocate tmpcursor\r\ngo\r\n-- end of query","url":"http://www.berndjungbluth.de/sqlfaq/sqlfaq.htm","lohn":13.5300,"datum":"2002-07-16T23:20:28.107","datei":"","topTopLabGuid":null,"typ":"txt","inboxes":[],"inverseTopTopLab":[],"postIt":null,"stamm":null,"tollis":[],"topTopLab":null}