Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)

  • RE: Removing Duplicates

    Or even more simply... 🙂

    DELETE D FROM

    (SELECT ProductName, ROW_NUMBER()OVER(ORDER BY ProductName) AS RowNum

    FROM dbo.T1) D

    where RowNum > 1

  • RE: delete duplicate value

    -- Two methods I really like (and plagiarized from people on here).

    create table #ttemp

    (cola int not null)

    insert into #ttemp (cola) values (1)

    insert into #ttemp (cola) values (1)

    insert into #ttemp (cola)...

  • RE: delete duplicates

    Here is a CTE based solution....

    ; WITH EmployeesCTE

    AS

    (

    SELECT ROW_NUMBER() OVER( PARTITION BY EmpID, EmpName ORDER BY EmpID ) AS RowNumber,

    ...

  • RE: Removing Duplicates

    This gives me syntax errors

Viewing 4 posts - 1 through 4 (of 4 total)