Each row in a table is characterized by a primary key. Now it is noticed that in your system the key occurs twice. This should not really. With this simple query you can quickly find duplicate rows in your table!
SELECT DISTINCT EMPLOYEE NUMBER EMPLOYEES FROM EMPLOYEES EMPLOYEENUMBER GROUP BY EMPLOYEE NUMBER COUNT ( EMPLOYEENUMBER ) > 1 HAVING COUNT (EMPLOYEE NUMBER)> 1
Then do you take these two numbers are not loading your data. QUERY below you can filter employees double.
* SELECT * ( FROM ( EmployeeNumber, SELECT Employee Number, OVER ( PARTITION BY EMPLOYEENUMBER ORDER BY EMPLOYEENUMBER ASC ) AS Rij Row_number () OVER (PARTITION BY EMPLOYEE NUMBER EMPLOYEE NUMBER ORDER BY ASC) AS Row EMPLOYEES AS LM FROM EMPLOYEES AS LM AS X ) AS X X. Rij <= 1 WHERE X. Row <= 1
What we do is add a row number for each unique Employee Number. If a number appears twice gets the row number 2. Then we retrieve all rows with the number> one way!






















Tags 
