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
What is a filestream?
What is lookup override?
what is a check constraint?
How to turn off warning messages during php execution?
What is a result set object returned by odbc_exec()?
Explain powershell included in sql server 2008?
Explain about remote stored procedure?
List the different index configurations possible for a table?
What is the ‘fillfactor’?
Do you know what is blocking?
Mention what are the core components of ssrs?
How to add an address record into adventureworkslt?
What is function of ROLLUP ?
How to assign new column names in a view?
What is difference between delete & truncate commands?