Solved

How to find none distinct values with SQL

Posted on 2008-10-18
1
173 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Trigger or Function that updates table with old values 5 48
Upgrading SQL 2005 Express to 2008 R2 Express 31 128
Problem with SqlConnection 4 178
Strange msg in the SSMS pane 13 58
Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

860 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