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...


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

Answers were Sorted based on User's Feedback



Hi All, I want to display all duplicate records in the table. My query has to fetch all the reco..

Answer / eralper

Hello Prem,
Please check the forum post
http://www.kodyaz.com/forums/thread/21123.aspx for solution
of your question. I see that you have asked this question
on several forums. That is a good idea to find an answer :)

Is This Answer Correct ?    1 Yes 0 No

Hi All, I want to display all duplicate records in the table. My query has to fetch all the reco..

Answer / vamsi

select id,Lastname, firstname from record where FirstName like 'Hoffman%' or LastName='Zach'

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

If no size is defined while creating the database, what size will the database have?

0 Answers  


What is blocking in SQL Server? If this situation occurs how to troubleshoot this issue

2 Answers   IBM,


Do you know what are the steps to process a single select statement?

0 Answers  


What are the differences between ms sql server & oracle?

0 Answers  


A trigger can reference objects outside the current database? State true or false.

0 Answers  


What are the different types of replication are there in sql server 2000?

0 Answers  


How to get the definition of a view out of the sql server?

0 Answers  


What is coalesce in sql server?

0 Answers  


How can i give the restrictions for the data entry, if i wish to enter only I ,II, III, IV in the grade actegory of student table?

3 Answers  


How to store pdf file in sql server?

1 Answers   CarrizalSoft Technologies, College School Exams Tests, TATA,


hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.

0 Answers  


What is MSDE?

2 Answers  


Categories