Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

how many layers of tcp/ip protocol combined of? : Sql server database administration

939


What is the default value of an integer data type in sql server 2005?

912


What is a database in ms sql server?

995


How to Sync Two SQL Azure Databases?

119


Explain what is the function of sql server agent windows service?

944


How can you manage sql azure security?

101


How to generate create function script on an existing function?

1048


I create a separate index on each column of a table. What are the advantages and disadvantages of this approach? : Sql server database administration

1037


what types of replication are supported in sql server? : Sql server database administration

959


How do you set a trace flag in sql server?

998


How do I run sql server 2014?

940


How to list all stored procedures in the current database using ms sql server?

1058


Explain the first normal form(1nf)?

972


What is server-level principal?

120


How to download and install the scaled-down database adventureworkslt?

953