Hi
I am currently trying to insert some data from another table, but would like to exclude any rows that contain duplicate data.
Ok the story behind this to help you guys and girls to understand why I want to do this. Recently we ran a process on our accounts package and it removed some data from our database. Luckily we have a backup of the table.
I ran a standard insert statement and managed to get the information into a test copy of our database. However after doing this we noticed that there were duplicate records.
So now I am trying to come up with an SQL script that will compare 2 tables and only insert the rows that are not duplicates.
Is this possible?
Thanks in advance for your help
I am currently trying to insert some data from another table, but would like to exclude any rows that contain duplicate data.
Ok the story behind this to help you guys and girls to understand why I want to do this. Recently we ran a process on our accounts package and it removed some data from our database. Luckily we have a backup of the table.
I ran a standard insert statement and managed to get the information into a test copy of our database. However after doing this we noticed that there were duplicate records.
So now I am trying to come up with an SQL script that will compare 2 tables and only insert the rows that are not duplicates.
Is this possible?
Thanks in advance for your help