[VIEWED 9511
TIMES]
|
SAVE! for ease of future access.
|
|
|
phone
Please log in to subscribe to phone's postings.
Posted on 01-10-19 8:47
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
I have a table with multiple duplicate values. It has 2 columns: FirstName and LastName . Now I want to select only unique values without using Distinct function. Please help. Thanks
|
|
|
|
Lee_St
Please log in to subscribe to Lee_St's postings.
Posted on 01-10-19 9:20
PM [Snapshot: 24]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
You could use Group by or Union, something like below Select FirstName, LastName, count(*) as Count from Name Group by FirstName, LastName Having Count(*) = 1
|
|
|
phone
Please log in to subscribe to phone's postings.
Posted on 01-11-19 9:47
AM [Snapshot: 148]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Thank you Lee_St Almost close but I need 1 unique value from the duplicate value as well. For example:- FirstName LastName A B A B In this case I need the answer only 1 FirstName A and LastName B Using above query removes both A and B.
|
|
|
master_sajha
Please log in to subscribe to master_sajha's postings.
Posted on 01-11-19 3:02
PM [Snapshot: 230]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Select FirstName, LastName from Name Group by FirstName, LastName
|
|
|
STUPIDA
Please log in to subscribe to STUPIDA's postings.
Posted on 01-11-19 3:27
PM [Snapshot: 237]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Do not use having clause.
|
|
|
28th amendment
Please log in to subscribe to 28th amendment's postings.
Posted on 01-14-19 12:37
PM [Snapshot: 410]
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
|
|
|