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
Explain about SQL server 2005?
How do you set a trace flag in sql server?
Why is the need for data conversion transformations?
What happens when unicode strings concatenate with non-unicode strings?
Explain for xml explicit mode?
What are types of scd? : sql server analysis services, ssas
What are SSL and TSL protocols?
How to select true false based on column value in sql server?
How do we Backup SQL Azure Data?
What are trace flags?
Define normalisation?
1.how to find the dead lock in sql server? 2.How to fine the memory leaks in sql server? 3.suppose transaction log file increasing what action will take ?
How do you troubleshoot errors in a SQL Server Agent Job?
What is the primary use of the model database?
Describe and explain about SQL native client?