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
What is difference between index and primary key?
What is the optimization being performed in oracle and SQL Server?
Explain nested join?
Can you get second highest salary from the table?
How to change parameter value inside the report?
What are the 10 characteristics of data quality?
What is a view in sql?
Where are sql server user names and passwords stored in sql server?
What are views used for?
What is surrogate key? : sql server analysis services, ssas
what is the system function to get the current user's user id? : Sql server database administration
What is the maximum size of column in sql server?
How do you rebuild an identity column?
What is difference between aggregate and analytic function?
What are the database objects? : SQL Server Architecture