Solved

How to find none distinct values with SQL

Posted on 2008-10-18
1
171 Views
Last Modified: 2010-03-19
Hi.
I have a table with two columns. I have to find the ident and group name where there is the same ident within the same group more than once.
Group    Ident
A            10
B             30
C             23
C             10
C             23
D             10
In this case the result should be
C      23
regards
Oli
0
Comment
Question by:tolvudeild-VS
1 Comment
 
LVL 14

Accepted Solution

by:
Binuth earned 125 total points
ID: 22747827
try this
SELECT [Group],[Ident]

FROM TableName

GROUP BY [Group],[Ident]

having count([Ident]) > 1

Open in new window

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now