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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the acid properties?

1007


What is an inner join?

988


What is a covered index?

942


What are the different Authentication modes in SQL Server and how can you change authentication mode?

1090


Can group functions be mixed with non-group selection fields in ms sql server?

945


Why use “pivot” in sql server?

1123


How many columns can exist together per table?

1157


How can a user-defined datatype be created?

989


Explain datetimeoffset data type in sal server 2008?

915


What is the difference between a unique key and primary key?

958


Explain few of the new features of sql server 2008 management studio

922


what is an extended stored procedure? : Sql server database administration

1060


What are trace flags?

1037


What is difference between index seek vs. Index scan?

1156


What is factless fact table? : sql server analysis services, ssas

1036