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

Explain how does the report manager work in ssrs?

997


Explain about merge replications?

1076


What is dynamic cursor in SQL SERVER?

1135


Define Wed Edition in SQL Azure?

102


What are different types of statement?

1083


What are the limitations/drawbacks or ssrs 2008 r2?

152


How to make a remote connection in a database?

1020


What are the components of sql server service broker?

1060


How to create dbo table in sql server?

1003


What do you mean by an execution plan? Why is it used?

1075


How to recreate an existing index in ms sql server?

1114


How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?

2049


Explain “row_number()” in sql server with an example?

1053


What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?

1018


What happens if the update subquery returns no rows in ms sql server?

1173