[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Display only duplicate records in Report Builder 3.0 Report

Posted on 2014-02-05
2
Medium Priority
?
1,606 Views
Last Modified: 2014-02-07
I'm trying to create a report in Report Builder 3.0 that displays only those records that have duplicates for a field's value.  My data source is a model.  Some records are duplicated twice, some up to four times and then the rest are unique.  I want to hide or filter out the unique records and only display records if there is at least one other record in the dataset with the same value.  Any suggestions?  

Thank you,
0
Comment
Question by:jaisy99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
chaau earned 1500 total points
ID: 39837502
The way you do this is by using grouping with the having clause. Take for example this situation: you have a table with a few columns: Column1, Column2, Column3, Column4. If you are interested in checking for duplicates against Column2 and Column3 you would write a SQL Statement grouping by those two columns only, like this:
SELECT Column2, Column3
FROM Table1
GROUP BY Column2, Column3
HAVING COUNT(*) > 1

Open in new window

If you need to check all columns the SQL statement will look like this:
SELECT Column1, Column2, Column3, Column4
FROM Table1
GROUP BY Column1, Column2, Column3, Column4
HAVING COUNT(*) > 1

Open in new window

The important thing here is to have HAVING COUNT(*) > 1 clause. It allows to select only those records that have the duplications (more than one duplicate records)
0
 
LVL 1

Author Closing Comment

by:jaisy99
ID: 39843747
Thank you.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

649 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