Write a query to delete duplicate records in SQL SERVER
Answer Posted / prem
Hi All,
I want to display all duplicate records in the table. My
query has to fetch all the records which are duplicate(First
Name or Last Name). Also I want the ability to also pull
names where there might be a middle initial placed in the
end of the first name field, (i.e., "Maria Z. " vs. "Maria")
as well.
Please guide me to find this.
Table:
ID FirstName LastName
1 Zach H Hoffman
2 Zach Hoffman
3 Troy Hoffman
4 Shawn Livermore
5 Prem S
6 Jony Hoffman H
7 Zach Modan
I need the query to filter.........
ID FirstName LastName
1 Zach H Hoffman
2 Zach Hoffman
3 Troy Hoffman
6 Jony Hoffman H
7 Zach Modan
I hope this example will give you clear idea.....
Thanks in Advance
Prem
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
how many layers of tcp/ip protocol combined of? : Sql server database administration
What is the default value of an integer data type in sql server 2005?
What is a database in ms sql server?
How to Sync Two SQL Azure Databases?
Explain what is the function of sql server agent windows service?
How can you manage sql azure security?
How to generate create function script on an existing function?
I create a separate index on each column of a table. What are the advantages and disadvantages of this approach? : Sql server database administration
what types of replication are supported in sql server? : Sql server database administration
How do you set a trace flag in sql server?
How do I run sql server 2014?
How to list all stored procedures in the current database using ms sql server?
Explain the first normal form(1nf)?
What is server-level principal?
How to download and install the scaled-down database adventureworkslt?