Oracle SQL Scripts:
1a. Deletion of Duplicate Data.
Code uses the same Employee Master table. The unique record in this table is a combination of Employee_ID and Manager_ID (so two identical or duplicate rows should not exist). If the table has a unique constraint or an index, the data clean-up has to be done in a staging table before loading into the core/main table. A unique constraint violation error will occur if a constraint or an index is implemented on this table. The query below deletes the older data and keeps the new or recently sent data. To keep the oldest data, the third condition in the WHERE clause needs to be reversed (e1.ROWID > e2.ROWID).
 
Employee_Master
Employee_IDNUMBER
Manager_IDNUMBER
First_NameVARCHAR2(some value)
Last_NameVARCHAR2(some value)
Phone_NumberVARCHAR2(some value)

 



For corrections or feedback, other useful links please contact webmaster

  7623