Full Text Query
-
I want to Delete Duplicate records From a table **except the Max(ID)**Using Full Text Query. and Duplicate records are just certain field not an entire row in a table. and I have millions of records in my table.........
-
I want to Delete Duplicate records From a table **except the Max(ID)**Using Full Text Query. and Duplicate records are just certain field not an entire row in a table. and I have millions of records in my table.........
Muhammad Fahim Baloch wrote:
I want to Delete Duplicate records From a table except the Max(ID)
You should be more specific how you define duplicate. Obviously you wnat to save the latest, but what's duplicate for you in this case.
Muhammad Fahim Baloch wrote:
Using Full Text Query
How does this relate to duplicates?
Muhammad Fahim Baloch wrote:
Duplicate records are just certain field
Which fields? It would be easiest if you provide a dessciption of the table and tell that based on what columns you want to observe the duplicates.
Muhammad Fahim Baloch wrote:
I have millions of records in my table
And how does this relate? Concerned about the speed perhaps?
The need to optimize rises from a bad design.My articles[^]
-
Muhammad Fahim Baloch wrote:
I want to Delete Duplicate records From a table except the Max(ID)
You should be more specific how you define duplicate. Obviously you wnat to save the latest, but what's duplicate for you in this case.
Muhammad Fahim Baloch wrote:
Using Full Text Query
How does this relate to duplicates?
Muhammad Fahim Baloch wrote:
Duplicate records are just certain field
Which fields? It would be easiest if you provide a dessciption of the table and tell that based on what columns you want to observe the duplicates.
Muhammad Fahim Baloch wrote:
I have millions of records in my table
And how does this relate? Concerned about the speed perhaps?
The need to optimize rises from a bad design.My articles[^]
I have a table, which has two rows 1.EmailID 2.EmailAddress I have Duplicate Email Addresses and i want to Delete Duplicate Email Addresses from my table except the max(emailId) and I have millions of Duplicate EmailAddresses in my table Plz ans me as soon as possible.... Thanks!
-
I have a table, which has two rows 1.EmailID 2.EmailAddress I have Duplicate Email Addresses and i want to Delete Duplicate Email Addresses from my table except the max(emailId) and I have millions of Duplicate EmailAddresses in my table Plz ans me as soon as possible.... Thanks!
Muhammad Fahim Baloch wrote:
I have Duplicate Email Addresses and i want to Delete Duplicate Email Addresses from my table except the max(emailId)
You could try something like:
delete from YourTable
where exists (select 1
from YourTable alias1
where alias1.emailaddress = YourTable.emailaddress
and alias1.emailid > YourTable.emailid)Remember to use begin transaction so that you can rollback if the result isn't what you wanted.
Muhammad Fahim Baloch wrote:
and I have millions of Duplicate EmailAddresses in my table
This means that unless you have proper indexing this will take a while.
The need to optimize rises from a bad design.My articles[^]
-
Muhammad Fahim Baloch wrote:
I have Duplicate Email Addresses and i want to Delete Duplicate Email Addresses from my table except the max(emailId)
You could try something like:
delete from YourTable
where exists (select 1
from YourTable alias1
where alias1.emailaddress = YourTable.emailaddress
and alias1.emailid > YourTable.emailid)Remember to use begin transaction so that you can rollback if the result isn't what you wanted.
Muhammad Fahim Baloch wrote:
and I have millions of Duplicate EmailAddresses in my table
This means that unless you have proper indexing this will take a while.
The need to optimize rises from a bad design.My articles[^]
Hi Thnks a lot.............................. Thanku agian............................. You are doing greate job Thanks agian,,,,,,, By