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
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 |
Answer / vamsi
select id,Lastname, firstname from record where FirstName like 'Hoffman%' or LastName='Zach'
| Is This Answer Correct ? | 0 Yes | 0 No |
How to write character string constants or literals in ms sql server?
How to get max 100 values from sql server
How to work on DTS?what is the main requirement?
What is a deadlock and what is a live lock?
What is #temp and @table variable in SQL server?
Tell me what do we need queues in sql service broker?
sql server architecture ?
what's the maximum size of a row? : Sql server database administration
Is natural join and equi join same?
What happens to a statement batch if there is a compilation error?
Explain intellisense for query editing
What is difference between inner join and join?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)